Skip to content

fix(deps): upgrade eslint and plugins to 9.39.4#201701

Merged
BenyFilho merged 8 commits intowwebjs:mainfrom
volebo:feat/deps-upgrade-eslint-10.mk
Apr 18, 2026
Merged

fix(deps): upgrade eslint and plugins to 9.39.4#201701
BenyFilho merged 8 commits intowwebjs:mainfrom
volebo:feat/deps-upgrade-eslint-10.mk

Conversation

@maxkoryukov
Copy link
Copy Markdown
Contributor

@maxkoryukov maxkoryukov commented Apr 7, 2026

Description

This PR changes (I hope) nothing in the package's code, but it upgrades the eslint to the newest v10.2.0 with the flat config structure.

Testing Summary

I converted the old .eslintrc.json and .eslintignore files into the newer "flat" format of eslint config - eslint.config.mjs.

.mjs for 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 @stylistic plugin as well, with its "recommended" config. Because of notes in the migration guide

ESLint has officially deprecated all built-in formatting and stylistic rules as of version 8.53.0

The "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

  • Dependency change (package changes such as removals, upgrades, or additions)
  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-code change (documentation, README, etc.)

Checklist

  • My code follows the style guidelines of this project.
  • All new and existing tests pass (npm test).
  • Typings (e.g. index.d.ts) have been updated if necessary.
  • Usage examples (e.g. example.js) / documentation have been updated if applicable.

SUMMARY

  • branch is updated
  • eslint is stable (9.39.4), it uses the new "flat" config
  • no @stylistic in favour of prettier
  • i reproduced the old config in the "flat"-style as accurate as i could
  • mocha plugin updated, and it is configured only for the /tests folder
  • languageOptions.ecmaVersion is set to 2025
  • in github actions/lint: node upgraded to v24, actions upgraded to the latest version

unrelated changes:

  • is-ci - NPM sort packages in "./package.json::dependencies" in the lexicographical order, so it moved down in the list
  • i've added several " " spaces in comments after //. No logic affected, i think i did it after i applied @stylistic - but now it is disabled
  • i added only one pattern for "unused" variables - ^ignoredError , in practice it is nice to have another pattern, like "__", but the package didn't have any - so i copied the config

@github-actions github-actions Bot added dependencies Dependency updates api changes API modifications tests Test related build Build system utility Utility code labels Apr 7, 2026
Comment thread src/authStrategies/BaseAuthStrategy.js
Comment thread src/Client.js Outdated
Comment thread tests/structures/chat.js
@github-actions github-actions Bot added ci CI pipeline infra Infrastructure labels Apr 7, 2026
Comment thread .github/workflows/lint.yml
Comment thread package.json Outdated
@2hoch1 2hoch1 mentioned this pull request Apr 7, 2026
9 tasks
@maxkoryukov maxkoryukov force-pushed the feat/deps-upgrade-eslint-10.mk branch from 4db9fb4 to 38b8177 Compare April 7, 2026 19:10
@maxkoryukov
Copy link
Copy Markdown
Contributor Author

@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 npm i , ensured that npm run lint -- --version returns

eslint
9.39.4

and checked the linting output.

after fixing minor issues (some // eslint ignore aren't required for eslint@9), the linter stopped to show warnings - and i pushed the PR for a new review.

@2hoch1
Copy link
Copy Markdown
Member

2hoch1 commented Apr 7, 2026

Your changes to lint.yml are blocking the ESLint workflow. Reverting the change should fix it.

@maxkoryukov
Copy link
Copy Markdown
Contributor Author

maxkoryukov commented Apr 7, 2026

Your changes to lint.yml are blocking the ESLint workflow. Reverting the change should fix it.

without this changes the Action fails, and the whole PR is considered "failing"

but let me remove those changes from the PR

UPD: DONE

@maxkoryukov maxkoryukov force-pushed the feat/deps-upgrade-eslint-10.mk branch from 38b8177 to 1b099ce Compare April 7, 2026 20:31
@github-actions github-actions Bot removed ci CI pipeline infra Infrastructure labels Apr 7, 2026
@maxkoryukov maxkoryukov changed the title fix(deps): upgrade eslint and plugins to 10.2.0 fix(deps): upgrade eslint and plugins to 9.39.4 Apr 7, 2026
BenyFilho
BenyFilho previously approved these changes Apr 7, 2026
@BenyFilho BenyFilho added the approved Confirmed by maintainers label Apr 7, 2026
@maxkoryukov
Copy link
Copy Markdown
Contributor Author

so, yes, i rolled back changes in the "gitlab actions" and now the "Lint/ Eslint(pull_request)" Check fails in the GH Actions

@BenyFilho BenyFilho dismissed their stale review April 7, 2026 20:40

Error, it was only to approve workflow

@BenyFilho BenyFilho removed the approved Confirmed by maintainers label Apr 7, 2026
@2hoch1
Copy link
Copy Markdown
Member

2hoch1 commented Apr 7, 2026

Your workflow didn’t run because you are a first‑time contributor.

The current error is caused by the lint.yml setup, since that workflow still uses Node@14 while @stylistic/eslint-plugin requires Node@18. That is why the tests workflow is passing but the lint workflow is failing.

You can try adjusting the lint.yml. The bump is in fact necessary, even if the workflow gets removed afterward.

Comment thread eslint.config.mjs Outdated
@maxkoryukov
Copy link
Copy Markdown
Contributor Author

Your workflow didn’t run because you are a first‑time contributor.

The current error is caused by the lint.yml setup, since that workflow still uses Node@14 while @stylistic/eslint-plugin requires Node@18. That is why the tests workflow is passing but the lint workflow is failing.

You can try adjusting the lint.yml. The bump is in fact necessary, even if the workflow gets removed afterward.

yep, I went through this whole process lint.yaml - broken - fixed - restricted - ...

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 @stylistic/.. that fails, it is espree (the core part of eslint). And even eslint 9.39.4 requires at least Node v18.18 - so removing @stylistic won't resolve this issue with GH Actions.

@github-actions github-actions Bot added the ci CI pipeline label Apr 8, 2026
@2hoch1
Copy link
Copy Markdown
Member

2hoch1 commented Apr 16, 2026

Make the following changes before merge:

  1. Scope Mocha to the test folder only
  2. Update ecmaVersion to 2025

The args: 'all' issue will be fixed in the future and shouldn't be included in this pr.

Comment thread .github/workflows/lint.yml
Comment thread package.json
Comment thread package.json
Comment thread .github/workflows/lint.yml
Comment thread .github/workflows/lint.yml
Comment thread src/authStrategies/BaseAuthStrategy.js
@BenyFilho BenyFilho added the approved Confirmed by maintainers label Apr 16, 2026
@maxkoryukov
Copy link
Copy Markdown
Contributor Author

i'm updating :

  • ecmaVersion for eslint config
  • limit the scope for "mocha" plugin
  • updating the branch

@maxkoryukov maxkoryukov force-pushed the feat/deps-upgrade-eslint-10.mk branch from ad7b03c to 931339d Compare April 16, 2026 23:06
@maxkoryukov
Copy link
Copy Markdown
Contributor Author

maxkoryukov commented Apr 16, 2026

SUMMARY

  • branch is updated
  • eslint is stable (9.39.4), it uses the new "flat" config
  • no @stylistic in favour of prettier
  • i reproduced the old config in the "flat"-style as accurate as i could
  • mocha plugin updated, and it is configured only for the /tests folder
  • languageOptions.ecmaVersion is set to 2025
  • in github actions/lint: node upgraded to v24, actions upgraded to the latest version

unrelated changes:

  • is-ci - NPM sort packages in "./package.json::dependencies" in the lexicographical order, so it moved down in the list
  • i've added several " " spaces in comments after //. No logic affected, i think i did it after i applied @stylistic - but now it is disabled
  • i added only one pattern for "unused" variables - ^ignoredError , in practice it is nice to have another pattern, like "__", but the package didn't have any - so i copied the config

@2hoch1
Copy link
Copy Markdown
Member

2hoch1 commented Apr 17, 2026

LGTM

Comment thread .github/workflows/lint.yml
@purpshell purpshell enabled auto-merge (squash) April 17, 2026 18:15
@purpshell
Copy link
Copy Markdown
Member

@maxkoryukov Please update the branch.

@purpshell purpshell disabled auto-merge April 17, 2026 18:16
@maxkoryukov maxkoryukov force-pushed the feat/deps-upgrade-eslint-10.mk branch from 931339d to 24da8d6 Compare April 18, 2026 19:55
@maxkoryukov
Copy link
Copy Markdown
Contributor Author

@purpshell - the branch is updated


SUMMARY

  • branch is updated
  • eslint is stable (9.39.4), it uses the new "flat" config
  • no @stylistic in favour of prettier
  • i reproduced the old config in the "flat"-style as accurate as i could
  • mocha plugin updated, and it is configured only for the /tests folder
  • languageOptions.ecmaVersion is set to 2025
  • in github actions/lint: node upgraded to v24, actions upgraded to the latest version
  • NEW: package-lock.json is updated

unrelated changes:

  • is-ci - NPM sort packages in "./package.json::dependencies" in the lexicographical order, so it moved down in the list
  • i've added several " " spaces in comments after //. No logic affected, i think i did it after i applied @stylistic - but now it is disabled
  • i added only one pattern for "unused" variables - ^ignoredError , in practice it is nice to have another pattern, like "__", but the package didn't have any - so i copied the config

@BenyFilho BenyFilho merged commit 2112053 into wwebjs:main Apr 18, 2026
4 checks passed
@maxkoryukov maxkoryukov deleted the feat/deps-upgrade-eslint-10.mk branch April 19, 2026 12:29
@maxkoryukov maxkoryukov restored the feat/deps-upgrade-eslint-10.mk branch April 19, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api changes API modifications approved Confirmed by maintainers build Build system ci CI pipeline dependencies Dependency updates infra Infrastructure tests Test related utility Utility code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants