Skip to content

Commit

Permalink
Fix eslint ci job
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio committed Jul 2, 2024
1 parent 8bbdc19 commit 8ea83d7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .ci-scripts/ci-eslint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

## NPM eslint
npm install -s eslint
npm install --save-dev eslint

## NPM test
find ./js -type f -name "*.js" | xargs node_modules/.bin/eslint -c ./.eslintrc.json
find ./js -type f -name "*.js" | xargs node_modules/.bin/eslint --stats -c ./.eslint.config.js
40 changes: 21 additions & 19 deletions .eslintrc.json → .eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
{
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {}
module.exports = {
"languageOptions": {
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {}
},
"globals": {
"process": true,
"BigInt": true,
"Global": true,
"Limits": true,
"rizin": true,
"atob": true,
"btoa": true,
"unit": true,
"console": true
}
},
"extends": "eslint:recommended",
"rules": {
"semi": [2, "always"],
"no-console": ["error", {
Expand All @@ -18,6 +30,7 @@
}],
"no-unused-vars": ["error", {
"varsIgnorePattern": "jsdec_|\\binclude\\b",
"caughtErrors": "none",
"args": "none"
}],
"curly": "error",
Expand All @@ -26,17 +39,6 @@
"no-constant-condition": ["error", {
"checkLoops": false
}],
"no-control-regex": "warn"
},
"globals": {
"process": true,
"BigInt": true,
"Global": true,
"Limits": true,
"rizin": true,
"atob": true,
"btoa": true,
"unit": true,
"console": true
"no-control-regex": "warn"
}
}
};
2 changes: 1 addition & 1 deletion .github/workflows/continuous-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "16"
node-version: "21"
- name: eslint
run: chmod +x .ci-scripts/ci-eslint.sh && .ci-scripts/ci-eslint.sh

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
build*/
subprojects/libquick*/
node_modules/
package.json
package-lock.json

0 comments on commit 8ea83d7

Please sign in to comment.