-
Notifications
You must be signed in to change notification settings - Fork 12
feat: move to ESLint v9 👏 #250
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
BREAKING CHANGE: Projects must now use ESLint v9 in order to use these rulesets.
- @strv/eslint-config-base@5.0.0-alpha.0 - @strv/eslint-config-graphql@3.0.0-alpha.0 - @strv/eslint-config-mocha@5.0.0-alpha.0 - @strv/eslint-config-node@5.0.0-alpha.0 - @strv/eslint-config-react@6.0.0-alpha.0 - @strv/eslint-config-typescript@6.0.0-alpha.0
- @strv/eslint-config-typescript@6.0.0-alpha.1
- @strv/eslint-config-base@5.0.0-alpha.1 - @strv/eslint-config-graphql@3.0.0-alpha.1 - @strv/eslint-config-mocha@5.0.0-alpha.1 - @strv/eslint-config-node@5.0.0-alpha.1 - @strv/eslint-config-react@6.0.0-alpha.1 - @strv/eslint-config-typescript@6.0.0-alpha.2
Used when working with vitest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added one small suggestion, otherwise it looks good.
I have tried out the new version in the Surge codebase and only a few adjustments were necessary:
- Rename
@typescript-eslint/indent
rule config to@stylistic/indent
- Rename
@typescript-eslint/no-throw-literal
rule config to@typescript-eslint/only-throw-error
- Add ignore for
fetch
andFormData
tonode/no-unsupported-features/node-builtins
rule config (or potentially even better, upgrade to Node 22)
I also had to regenerate package-lock.json
in order to resolve all peer deps conflicts and completely drop one very old ESLint plugin (eslint-plugin-filenames
) – I think it would be possible to salvage it by patching it, but we don't really need it so I didn't bother.
@@ -2,7 +2,7 @@ import node from './packages/eslint-config-node/index.mjs' | |||
import optional from './packages/eslint-config-node/optional.mjs' | |||
import style from './packages/eslint-config-node/style.mjs' | |||
|
|||
/** @type {Array<import("eslint").Linter.FlatConfig>} */ | |||
/** @type {Array<import("eslint").Linter.Config>} */ | |||
const configs = [{ | |||
linterOptions: { | |||
reportUnusedDisableDirectives: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reportUnusedDisableDirectives: true, | |
reportUnusedDisableDirectives: true, | |
}, | |
settings: { | |
'import/resolver': { typescript: {} }, |
If this setting gets added here...
// TODO: Figure out why ESLint cannot resolve the @typescript-eslint packages | ||
'import/no-unresolved': 'off', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...we can get rid of this override.
// TODO: Figure out why ESLint cannot resolve the @typescript-eslint packages | |
'import/no-unresolved': 'off', |
BREAKING CHANGE: Projects must now use ESLint v9 in order to use these rulesets.