fix(deps): upgrade eslint and plugins to 9.39.4#201701
fix(deps): upgrade eslint and plugins to 9.39.4#201701maxkoryukov wants to merge 5 commits intowwebjs:mainfrom
Conversation
| setup(client) { | ||
| this.client = client; | ||
| } | ||
|
|
There was a problem hiding this comment.
there are "stylistic changes":
- add empty lines
- add a
<space>for inline comments - replace unused
err(or_, or other names) withignoredError - and there are two lines i didn't want to change - so i've added "eslint-ignore" to them
| }); | ||
|
|
||
| // eslint-disable-next-line mocha/no-skipped-tests | ||
| // eslint-disable-next-line mocha/no-pending-tests |
There was a problem hiding this comment.
this rule was renamed in the newest versions of the eslint-mocha plugin
| - uses: actions/checkout@v2 | ||
| - name: Install node v14 | ||
| uses: actions/setup-node@v2 | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
and here are the most dangerous changes, because it affects the "Pipeline"
i've upgraded the task to use "actions@v4" and instead of using Node14 - Node24
because:
- it is linting, not "running the package"
- it is 2026;) and Node14 is "end of life" after Feb 16, 2023
There was a problem hiding this comment.
This workflow has been replaced by tests and will be removed in the future. #127111
There was a problem hiding this comment.
i needed to update it because the pipeline was failing
but i can remove it from the PR
i've updated the PR today, but i still didn't remove GH Action update
package.json
Outdated
| "chai-as-promised": "^7.1.1", | ||
| "dotenv": "^16.0.0", | ||
| "eslint": "^8.4.1", | ||
| "eslint": "^10.2.0", |
There was a problem hiding this comment.
Using the latest version isn’t always the best choice. Downgrade to eslint@9.39.4 for a more stable release.
feat: cfg 2 feat: asdf
feat: tmp 1
4db9fb4 to
38b8177
Compare
|
@2hoch1 thanks for reviewing so fast! and thanks for adding the #201702 (stale deps) - i didn't notice this bug and i've downgraded eslint to @9.39.4 in order to test i put this whole repo into a "node:24" docker image without eslint pre-installed, ran and checked the linting output. after fixing minor issues (some |
|
Your changes to |
without this changes the Action fails, and the whole PR is considered "failing" but let me remove those changes from the PR UPD: DONE |
38b8177 to
1b099ce
Compare
|
so, yes, i rolled back changes in the "gitlab actions" and now the "Lint/ Eslint(pull_request)" Check fails in the GH Actions |
|
Your workflow didn’t run because you are a first‑time contributor. The current error is caused by the You can try adjusting the |
eslint.config.mjs
Outdated
| import globals from 'globals'; | ||
| import pluginEslintJs from '@eslint/js'; | ||
| import pluginMocha from 'eslint-plugin-mocha'; | ||
| import pluginStylistic from '@stylistic/eslint-plugin'; |
There was a problem hiding this comment.
@stylistic/eslint-plugin may cause formatting conflicts with Prettier.
There was a problem hiding this comment.
for @stylistic/eslint-plugin
i was following this logic:
- old
eslintwas 8.4.1, and the new is 9.39.4, and most stylistic rules were marked deprecated/or were removed from the eslint config. So, rules like "spaced-comment" "comma-dangle" "quotes", ... now live in@stylistic - in order to preserve the existing code style restrictions i've added
@stylistic's "recommended" config, and tried to write bad code (i tested just a few rules: dangling commas, trailing spaces, quotes and spaces in comments) - and the config handled everything well - then i checked for conflicts with prettier:
$ npx eslint-config-prettier src/ > No rules that are unnecessary or conflict with Prettier were found.
also, i thought that @stylistic gives more tools (rules) for setting the "correct" code style, so instead of postponing the task of "add @Stylistic" to the config - i tested and already added it.
i don't mind removing @stylistic, but the remaining "@eslint/js/recommended" isn't really "restrictive enough". One can check its sources, and there are no "quotes" or "comma-*" rules. And this rules were enabled in the default eslint@8 config (if i'm not mistaken)
so, my goal was: keep the same config, avoid errors
please, ping me, if @stylistic should be removed - and i will update the PR
There was a problem hiding this comment.
remove @stylistic and only use prettier
yep, I went through this whole process So, i'm going to push that sent... lost, found, subjected to public inquiry, lost again, and finally buried in soft peat commit back ;) the pipeline will be in the "unapproved changes"-state, that's completely out of my control - i don't need it, but the maintainers' help and participation will be required to resolve this. Also: it is not |
|
ok, I pushed back the commit 38b8177 |
done |
.github/workflows/lint.yml
Outdated
| node-version: '24' | ||
| - name: Install dependencies | ||
| run: npm install | ||
| run: npm ci |
There was a problem hiding this comment.
use npm install instead of npm ci
because it is linting (not runtime), so why not to use the latest stable Node version
38b8177 to
ad7b03c
Compare
|
i think it is ready for another review:
and the branch seems to be "updated" |
Description
This PR changes (I hope) nothing in the package's code, but it upgrades the
eslintto the newest v10.2.0 with the flat config structure.Testing Summary
I converted the old
.eslintrc.jsonand.eslintignorefiles into the newer "flat" format of eslint config -eslint.config.mjs..mjsfor the config file - because today it is very common to share/copy/paste eslint configs and examples in ESM format.In order to test - i took my previous PRs "as is" and applied
npm run lint:fix- and the new 10.2.0 eslint fixed the code.I've added
@stylisticplugin as well, with its "recommended" config. Because of notes in the migration guideThe "Prettier" integration is preserved, and as its documentation says - it is added to the end of the "flat" config (this way "Prettier" config overrides some options and make Eslint and Prettier work harmoniously)
Type of Change
Checklist
npm test).index.d.ts) have been updated if necessary.example.js) / documentation have been updated if applicable.