Skip to content

chore: update to ESLint 9 #10705

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

Merged
merged 8 commits into from
Apr 17, 2024
Merged

chore: update to ESLint 9 #10705

merged 8 commits into from
Apr 17, 2024

Conversation

haoqunjiang
Copy link
Member

@haoqunjiang haoqunjiang commented Apr 15, 2024

Closes #10703

Note that the current stable version of the VS Code ESLint extension doesn't fully support flat config.
microsoft/vscode-eslint#1822 (comment)
You need to switch to the pre-release version for editor support manually.
image

Side note: Though typescript-eslint hasn't officially supported ESLint 9, the remaining issues are irrelevant to its usage in this repo, so I patched them in the peer dependency rules.

- Though `@typescript-eslint/*` haven't officially supported ESLint 9,
  the remaining issues are not relevant to its usage in this repo, so
  I patched them in the peer dependency rules.
- Flat Config migration takes time so I used
  `ESLINT_USE_FLAT_CONFIG=false` for now
- Optional catch binding is supported since Node.js v10, so I removed
  the unused `e`s in `release.js` to suppress the `no-unused-vars`` error
- `eslint-plugin-i` is now `eslint-plugin-import-x`, I'll migrate it in
  a later commit
- We don't use Jest in this repo, I'll migrate `eslint-plugin-jest` to
  `eslint-plugin-vitest` in a later commit
Also updates the lint-staged config.
Because it doesn't support the shell convention of expanding environment
variables, I had to add the `cross-env` package.

https://github.com/lint-staged/lint-staged#use-environment-variables-with-linting-commands
Copy link

github-actions bot commented Apr 15, 2024

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 90.6 kB 34.5 kB 31.1 kB
vue.global.prod.js 148 kB 53.8 kB 48 kB

Usages

Name Size Gzip Brotli
createApp 50.8 kB 19.9 kB 18.1 kB
createSSRApp 54.1 kB 21.2 kB 19.3 kB
defineCustomElement 53.1 kB 20.6 kB 18.8 kB
overall 64.4 kB 24.9 kB 22.6 kB

@haoqunjiang haoqunjiang marked this pull request as ready for review April 15, 2024 17:14
@haoqunjiang haoqunjiang changed the title [WIP] chore: update to ESLint 9 chore: update to ESLint 9 Apr 15, 2024
@haoqunjiang haoqunjiang added 🧹 p1-chore Priority 1: this doesn't change code behavior. ready for review This PR requires more reviews labels Apr 15, 2024
@yyx990803 yyx990803 merged commit ea494af into vuejs:main Apr 17, 2024
lynxlangya pushed a commit to lynxlangya/core that referenced this pull request May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧹 p1-chore Priority 1: this doesn't change code behavior. ready for review This PR requires more reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants