Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to ESLint v9 #432

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hyperupcall
Copy link

@hyperupcall hyperupcall commented Dec 21, 2024

This updates ESLint to v9. I followed the instructions of ESLint Configuration Migrator verbatim for the first part:

$ pnpx @eslint/migrate-config .eslintrc.json
...
Migrating .eslintrc.json

Wrote new config to ./eslint.config.mjs

You will need to install the following packages to use the new config:
- globals
- @eslint/compat
- @eslint/js
- @eslint/eslintrc

You can install them using the following command:

npm install globals @eslint/compat @eslint/js @eslint/eslintrc -D

The following messages were generated during migration:
- The 'node' environment is used, so switching sourceType to 'commonjs'.

$ yarn add -D globals @eslint/compat @eslint/js @eslint/eslintrc
yarn add v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "web-ext > addons-linter > [email protected]" has unmet peer dependency "@types/[email protected]".
warning "web-ext > addons-linter > [email protected]" has unmet peer dependency "[email protected]".
warning "web-ext > addons-linter > [email protected]" has unmet peer dependency "[email protected]".
warning "web-ext > addons-linter > [email protected]" has unmet peer dependency "[email protected]".
warning "web-ext > addons-linter > [email protected]" has unmet peer dependency "[email protected]".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 4 new dependencies.
info Direct dependencies
├─ @eslint/[email protected]
├─ @eslint/[email protected]
├─ @eslint/[email protected]
└─ [email protected]
info All dependencies
├─ @eslint/[email protected]
├─ @eslint/[email protected]
├─ @eslint/[email protected]
└─ [email protected]
Done in 55.48s.

Then, I:

  • Installed eslint@latest
  • Replaced the deprecated --ignore-path with includeIgnoreFiles
  • Removed eslint-plugin-prettier and replaced it with adding eslint-config-prettier to configuration (This was done to fix a "prettier.resolveConfig is not a function" error. Besides, using eslint-plugin-prettier is generally not recommended nowadays anyways).
$ yarn add -D eslint@latest
$ yarn lint
yarn run v1.22.22
$ eslint .
Done in 1.10s.

@hyperupcall
Copy link
Author

hyperupcall commented Dec 21, 2024

@nickserv @kaicataldo Hey I know this repository hasn't been updated in a while - I was wondering if there is still interest by Prettier maintainers to have a tool like this? I really like this tool (and I think many others do as well) and it would be nice to see this tool continue to exist and hopefully get some updates-

Last year I opened #431 in addition to this PR - If there is support from Prettier maintainers I'd be happy to pitch in and land PRs to get this project up to speed in terms of tooling, but also in usability fixes and features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant