-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from koodiklinikka/fix-lint
Fix lint issues, run lint in CI
- Loading branch information
Showing
10 changed files
with
125 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,51 +2,60 @@ name: Build | |
|
||
on: | ||
push: | ||
branches: [ master ] | ||
branches: [master] | ||
pull_request: | ||
branches: [ master ] | ||
branches: [master] | ||
#schedule: | ||
# Update automatically on weekdays during work hours | ||
#- cron: '0 10,13,16 * * 1-5' | ||
# ... and every night | ||
#- cron: '0 0 * * *' | ||
# Update automatically on weekdays during work hours | ||
#- cron: '0 10,13,16 * * 1-5' | ||
# ... and every night | ||
#- cron: '0 0 * * *' | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: pip | ||
- uses: pre-commit/[email protected] | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: pip | ||
- name: Install dependencies | ||
run: python -m pip install -r requirements.txt | ||
- name: Build | ||
run: make -j3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
cache: yarn | ||
cache-dependency-path: analysaattori/yarn.lock | ||
- run: yarn | ||
working-directory: analysaattori | ||
- run: yarn build -- --base=/palkkakysely/analysaattori/ | ||
working-directory: analysaattori | ||
env: | ||
GENERATE_SOURCEMAP: 'false' | ||
- run: cp -a analysaattori/dist ./out/analysaattori | ||
- run: ls -laR out | ||
- run: touch out/.nojekyll | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: out | ||
clean: false | ||
if: ${{ github.event_name == 'push' }} | ||
env: | ||
GIT_AUTHOR_EMAIL: "[email protected]" | ||
GIT_AUTHOR_NAME: "Koodiklinikka Robot" | ||
GIT_COMMITTER_EMAIL: "[email protected]" | ||
GIT_COMMITTER_NAME: "Koodiklinikka Robot" | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: pip | ||
- name: Install dependencies | ||
run: python -m pip install -r requirements.txt | ||
- name: Build | ||
run: make -j3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
cache: yarn | ||
cache-dependency-path: analysaattori/yarn.lock | ||
- run: yarn | ||
working-directory: analysaattori | ||
- run: yarn build -- --base=/palkkakysely/analysaattori/ | ||
working-directory: analysaattori | ||
env: | ||
GENERATE_SOURCEMAP: "false" | ||
- run: cp -a analysaattori/dist ./out/analysaattori | ||
- run: ls -laR out | ||
- run: touch out/.nojekyll | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: out | ||
clean: false | ||
if: ${{ github.event_name == 'push' }} | ||
env: | ||
GIT_AUTHOR_EMAIL: "[email protected]" | ||
GIT_AUTHOR_NAME: "Koodiklinikka Robot" | ||
GIT_COMMITTER_EMAIL: "[email protected]" | ||
GIT_COMMITTER_NAME: "Koodiklinikka Robot" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# prettier doesn't understand jinja, the poor thing | ||
template/*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from './App'; | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import App from "./App"; | ||
|
||
ReactDOM.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
document.getElementById('root') | ||
document.getElementById("root"), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,6 @@ | |
OTHER_GENDER_VALUES, | ||
TYOKOKEMUS_COL, | ||
ROOLI_NORM_COL, | ||
PALAUTE_COL, | ||
TIMESTAMPS_TO_DROP, | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
ignore = [ | ||
"E501", | ||
"PD901", # I know "df" isn't the best name | ||
] | ||
extend-select = [ | ||
"COM", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,78 @@ | ||
body { | ||
padding: 1em; | ||
font: 18px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; | ||
padding: 1em; | ||
font: | ||
18px/1.5 -apple-system, | ||
BlinkMacSystemFont, | ||
"Segoe UI", | ||
Roboto, | ||
"Helvetica Neue", | ||
Arial, | ||
"Noto Sans", | ||
sans-serif, | ||
"Apple Color Emoji", | ||
"Segoe UI Emoji", | ||
"Segoe UI Symbol", | ||
"Noto Color Emoji"; | ||
} | ||
|
||
body.static-body { | ||
max-width: 650px; | ||
margin: auto; | ||
max-width: 650px; | ||
margin: auto; | ||
} | ||
|
||
body.table-body { | ||
font-size: 14px; | ||
line-height: 1.3; | ||
font-size: 14px; | ||
line-height: 1.3; | ||
} | ||
|
||
body.table-body table { | ||
border-collapse: collapse; | ||
border-collapse: collapse; | ||
} | ||
|
||
body.table-body td, body.table-body th { | ||
padding: 0.3em; | ||
border: 1px solid #999; | ||
body.table-body td, | ||
body.table-body th { | ||
padding: 0.3em; | ||
border: 1px solid #999; | ||
} | ||
|
||
h1, h2, h3 { | ||
line-height: 1.2; | ||
h1, | ||
h2, | ||
h3 { | ||
line-height: 1.2; | ||
} | ||
|
||
a:link { | ||
color: #2181b7; | ||
color: #2181b7; | ||
} | ||
|
||
a:visited { | ||
color: #4e1ecb; | ||
color: #4e1ecb; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
body { | ||
color: white; | ||
background: #444 | ||
} | ||
body { | ||
color: white; | ||
background: #444; | ||
} | ||
|
||
a:link { | ||
color: #5bf | ||
} | ||
a:link { | ||
color: #5bf; | ||
} | ||
|
||
a:visited { | ||
color: #ccf | ||
} | ||
a:visited { | ||
color: #ccf; | ||
} | ||
} | ||
|
||
header { | ||
border-bottom: 2px solid #2a6180; | ||
padding-bottom: 1em; | ||
line-height: 1; | ||
border-bottom: 2px solid #2a6180; | ||
padding-bottom: 1em; | ||
line-height: 1; | ||
} | ||
|
||
footer { | ||
border-top: 2px solid #2a6180; | ||
padding: 1em; | ||
margin-top: 1em; | ||
text-align: center; | ||
border-top: 2px solid #2a6180; | ||
padding: 1em; | ||
margin-top: 1em; | ||
text-align: center; | ||
} |