Skip to content

feat: move to ESLint v9 👏 #250

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

robertrossmann
Copy link
Member

BREAKING CHANGE: Projects must now use ESLint v9 in order to use these rulesets.

BREAKING CHANGE: Projects must now use ESLint v9 in order to use these rulesets.
@robertrossmann robertrossmann added enhancement New feature or request dependencies Pull requests that update a dependency file labels Jan 24, 2025
@robertrossmann robertrossmann self-assigned this Jan 24, 2025
Copy link

@jirikapoun jirikapoun left a 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 and FormData to node/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,
Copy link

@jirikapoun jirikapoun Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
reportUnusedDisableDirectives: true,
reportUnusedDisableDirectives: true,
},
settings: {
'import/resolver': { typescript: {} },

If this setting gets added here...

Comment on lines 19 to 20
// TODO: Figure out why ESLint cannot resolve the @typescript-eslint packages
'import/no-unresolved': 'off',

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.

Suggested change
// TODO: Figure out why ESLint cannot resolve the @typescript-eslint packages
'import/no-unresolved': 'off',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants