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

ESLint v9 Support #8211

Open
36 of 42 tasks
Tracked by #79 ...
bradzacher opened this issue Jan 7, 2024 · 27 comments
Open
36 of 42 tasks
Tracked by #79 ...

ESLint v9 Support #8211

bradzacher opened this issue Jan 7, 2024 · 27 comments
Labels
accepting prs Go ahead, send a pull request that resolves this issue dependencies Issue about dependencies of the package
Milestone

Comments

@bradzacher
Copy link
Member

bradzacher commented Jan 7, 2024

ESLint has released v9.

Note that it contains breaking changes and as such we do not currently support it. It may work or it may not.

We are not accepting issues against v9 until we have official support - so please do not file issues with crashes or bugs for now and please do not comment on this issue telling us about crashes.

If you believe you have a bug when using ESLint v8 - please file a new issue.
If you need some help setting up / configuring your project - please visit our discord.

If you'd like to help contribute towards support feel free to comment!


Ongoing Work

Breaking Changes

  • correct camelcase rule schema for allow option
  • move AST traversal into SourceCode
  • disallow multiple configuration comments for same rule
  • default for enforceForClassMembers in no-useless-computed-key
  • no-unused-vars default caughtErrors to ‘all’: Enhancement: [no-unused-vars] Update for ESLint 9 defaults #8967
  • no-unused-vars varsIgnorePattern behavior with catch arguments: Enhancement: [no-unused-vars] Update for ESLint 9 defaults #8967
  • no-restricted-imports allow multiple config entries for same path
  • no-sequences rule schema correction
  • no-invalid-regexp make allowConstructorFlags case-sensitive
  • no-inner-declaration new default behaviour and option
  • add two more cases to no-implicit-coercion
  • Remove valid-jsdoc and require-jsdoc
  • handle --output-file for empty output when saving to disk
  • upgrade eslint-scope@8.0.0
  • configuration comments with just severity should retain options
  • Remove CodePath#currentSegments
  • remove no-inner-declarations from eslint:recommended
  • Rename FlatESLint to ESLint
  • skip running warnings in --quiet mode
  • Set default schema: [], drop support for function-style rules
  • Switch Linter to flat config by default: Enhancement(utils): Update types ESLint v9 Linter class (flat config) #8968
  • Parsing ‘exported’ comment using parseListConfig
  • Behavior of CLI when no arguments are passed
  • Update shouldUseFlatConfig and CLI so flat config is default
  • deprecate no-new-symbol, recommend no-new-native-nonconstructor
  • Update eslint:recommended configuration
  • drop support for string configurations in flat config array
  • Remove SourceCode#getComments()
  • Remove deprecated context methods
  • Swap FlatESLint-ESLint, FlatRuleTester-RuleTester in API Enhancement(utils): Swap FlatESLint-ESLint, FlatRuleTester-RuleTester in API #8970
  • remove formatters except html, json(-with-metadata), and stylish
  • Require Node.js ^18.18.0 || ^20.9.0 || >=21.1.0

Changes we're treating as non-breaking

Per discussion in #8211, these augmentations fix previous gaps in the RuleTester. We'll treat them as non-breaking bug fixes so they can land in the v7 major version ahead of v8.

@bradzacher bradzacher added breaking change This change will require a new major version to be released dependencies Issue about dependencies of the package labels Jan 7, 2024
@bradzacher bradzacher added this to the 7.0.0 milestone Jan 7, 2024
@bradzacher bradzacher pinned this issue Jan 27, 2024
@heymartinadams

This comment was marked as resolved.

@JoshuaKGoldberg

This comment was marked as resolved.

@heymartinadams

This comment was marked as resolved.

This comment was marked as resolved.

@bradzacher
Copy link
Member Author

bradzacher commented Feb 16, 2024

If you glance at the implementation you'll see that the helper is the identity function -- if you don't use the extends feature it adds.

That means that writing export default tseslint.config(...) is semantically the same as export default [...];. The difference is that the latter is untyped, but the former has strict types defined. This means your config can be checked -- mistakes will be flagged and you'll get auto-complete with each property fully documented via jsdoc.

We introduced this util because it provides a simple way for people to typecheck their configs. Otherwise people need to annotate the array with a jsdoc type which is very cumbersome and verbose:

/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfigArray} */
export default [...];

// vs

export default tseslint.config(...);

We can definitely clarify this in the docs if it wasn't clear that the util isn't required.

@JoshuaKGoldberg JoshuaKGoldberg removed the breaking change This change will require a new major version to be released label Mar 25, 2024
@trivikr

This comment was marked as resolved.

@bradzacher
Copy link
Member Author

bradzacher commented Apr 5, 2024

v9 has officially released
https://eslint.org/blog/2024/04/eslint-v9.0.0-released/

Note that it contains breaking changes and as such we do not currently support it. It may work or it may not.

This issue tracks our official support.

Note that we are not accepting issues against v9 until we have official support - so please do not file issues with crashes or bugs for now and please do not comment on this issue telling us about crashes.

If you'd like to help contribute towards support feel free to comment!
See the comment below for more info

@jamesgpearce
Copy link

Don't want to add to the noise, but did want to say thank you for being so clear and organized about what is supported and what the status is. Saved me a morning of wrestling with the immediate v9.0 fallout; I know to wait! 🙏

slifty added a commit to PhilanthropyDataCommons/service that referenced this issue May 1, 2024
Right now our typescript-eslint dependency does not support eslint v9.
They're working on it [1] but until that's done we want dependabot to
ignore major eslint updates.

Issue #978 Adjust dependabot settings for ESLint 9

[1] typescript-eslint/typescript-eslint#8211
@js2me

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting prs Go ahead, send a pull request that resolves this issue dependencies Issue about dependencies of the package
Projects
None yet
Development

No branches or pull requests