Skip to content

Commit b16bff8

Browse files
committed
Fix eslint ci job
1 parent 9a721bf commit b16bff8

File tree

4 files changed

+27
-22
lines changed

4 files changed

+27
-22
lines changed

.ci-scripts/ci-eslint.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
## NPM eslint
5-
npm install -s eslint
5+
npm install --save-dev eslint
66

77
## NPM test
8-
find ./js -type f -name "*.js" | xargs node_modules/.bin/eslint -c ./.eslintrc.json
8+
find ./js -type f -name "*.js" | xargs node_modules/.bin/eslint --stats -c ./.eslint.config.js

.eslintrc.json .eslint.config.js

+21-19
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
{
2-
"parserOptions": {
3-
"ecmaVersion": "latest",
4-
"sourceType": "module",
5-
"ecmaFeatures": {}
1+
module.exports = {
2+
"languageOptions": {
3+
"parserOptions": {
4+
"ecmaVersion": "latest",
5+
"sourceType": "module",
6+
"ecmaFeatures": {}
7+
},
8+
"globals": {
9+
"process": true,
10+
"BigInt": true,
11+
"Global": true,
12+
"Limits": true,
13+
"rizin": true,
14+
"atob": true,
15+
"btoa": true,
16+
"unit": true,
17+
"console": true
18+
}
619
},
7-
"extends": "eslint:recommended",
820
"rules": {
921
"semi": [2, "always"],
1022
"no-console": ["error", {
@@ -18,6 +30,7 @@
1830
}],
1931
"no-unused-vars": ["error", {
2032
"varsIgnorePattern": "jsdec_|\\binclude\\b",
33+
"caughtErrors": "none",
2134
"args": "none"
2235
}],
2336
"curly": "error",
@@ -26,17 +39,6 @@
2639
"no-constant-condition": ["error", {
2740
"checkLoops": false
2841
}],
29-
"no-control-regex": "warn"
30-
},
31-
"globals": {
32-
"process": true,
33-
"BigInt": true,
34-
"Global": true,
35-
"Limits": true,
36-
"rizin": true,
37-
"atob": true,
38-
"btoa": true,
39-
"unit": true,
40-
"console": true
42+
"no-control-regex": "warn"
4143
}
42-
}
44+
};

.github/workflows/continuous-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-node@v4
1616
with:
17-
node-version: "16"
17+
node-version: "21"
1818
- name: eslint
1919
run: chmod +x .ci-scripts/ci-eslint.sh && .ci-scripts/ci-eslint.sh
2020

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
build*/
22
subprojects/libquick*/
3+
node_modules/
4+
package.json
5+
package-lock.json

0 commit comments

Comments
 (0)