diff --git a/.ci-scripts/ci-eslint.sh b/.ci-scripts/ci-eslint.sh index 1e5961a..572dbb2 100644 --- a/.ci-scripts/ci-eslint.sh +++ b/.ci-scripts/ci-eslint.sh @@ -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 diff --git a/.eslintrc.json b/.eslint.config.js similarity index 54% rename from .eslintrc.json rename to .eslint.config.js index aca9b60..cea6406 100644 --- a/.eslintrc.json +++ b/.eslint.config.js @@ -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", { @@ -18,6 +30,7 @@ }], "no-unused-vars": ["error", { "varsIgnorePattern": "jsdec_|\\binclude\\b", + "caughtErrors": "none", "args": "none" }], "curly": "error", @@ -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" } -} +}; \ No newline at end of file diff --git a/.github/workflows/continuous-tests.yml b/.github/workflows/continuous-tests.yml index 6ceec23..9f424cb 100644 --- a/.github/workflows/continuous-tests.yml +++ b/.github/workflows/continuous-tests.yml @@ -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 diff --git a/.gitignore b/.gitignore index 554cdec..8ab9d0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ build*/ subprojects/libquick*/ +node_modules/ +package.json +package-lock.json \ No newline at end of file