-
Notifications
You must be signed in to change notification settings - Fork 813
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub actions and eslint config - warning only for now (#3723)
* first step with eslint and github actions build * warnings only
- Loading branch information
Showing
7 changed files
with
617 additions
and
3,157 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.eslintrc.js | ||
dist |
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,24 @@ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
globals: { | ||
'luxon': 'readonly', | ||
'XLSX': 'readonly', | ||
'jspdf': 'readonly' | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["only-warn"], | ||
"rules": { | ||
"semi": "error", | ||
"indent": ["error", "tab"], | ||
"no-unused-vars": ["warn", { "vars": "all", "args": "none", "ignoreRestSiblings": false }], | ||
"no-fallthrough": "off", | ||
"no-inner-declarations": "off", | ||
} | ||
} |
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,39 @@ | ||
name: Bad files check | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
check: | ||
name: Dist check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
|
||
- name: Get specific changed files in dist | ||
id: changed-files-specific | ||
uses: tj-actions/changed-files@v17.3 | ||
with: | ||
files: | | ||
dist | ||
- name: Check file existence | ||
id: check_files | ||
uses: andstor/file-existence-action@v1 | ||
with: | ||
files: "yarn.lock" | ||
|
||
- name: Fail if dist files changed | ||
if: steps.changed-files-specific.outputs.any_changed == 'true' | ||
run: | | ||
echo "Oops! Looks like you modified some files in dist/. Please remove them from your PR, thanks!" | ||
exit 1 | ||
- name: Fail if yarn lock exists | ||
if: steps.check_files.outputs.files_exists == 'true' | ||
run: | | ||
echo "Oops! Looks like you checked in a yarn.lock file, we use npm and package-lock.json. Please remove it from your PR, thanks!" | ||
exit 1 |
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,31 @@ | ||
name: Lint and build | ||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
linting: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Build | ||
run: npm run build |
Oops, something went wrong.