-
Notifications
You must be signed in to change notification settings - Fork 194
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
Migrate to eslint flat config #6226
Labels
Comments
Once all pieces involved support flat config, the new config file should look something on these lines: const tseslint = require('typescript-eslint');
const hypothesis = require('eslint-config-hypothesis');
const jsxA11Y = require('eslint-plugin-jsx-a11y');
module.exports = tseslint.config(hypothesis, jsxA11Y, {
plugins: {
'@typescript-eslint': tseslint.plugin,
},
languageOptions: {
parser: tseslint.parser,
},
rules: {
// All rules as defined currently in .eslintrc file
},
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Eslint has a new recommended configuration system (AKA flat config) which is supported by v8, and will be the default in v9.
In order to migrate to it, these are the requirements.
eslintrc
file with a neweslint.config.js
file. Migration guide: https://eslint.org/docs/latest/use/configure/migration-guide@typescript-eslint/eslint-plugin
and@typescript-eslint/parser
with the newtypescript-eslint
package: Migration docs can be found here https://typescript-eslint.io/blog/announcing-typescript-eslint-v7/eslint-plugin-jsx-a11y
has been migrated to support flat config: feat: support new config system jsx-eslint/eslint-plugin-jsx-a11y#891eslint-config-hypothesis
to support flat config: Add support in eslint-config-hypothesis for eslint flat config frontend-toolkit#48At the time of writing this, eslint only supports
js
extension for the flat config file. However,mjs
andcjs
support has been implemented and added to eslint 9 alpha versions.This means the file needs to be written in CJS format as the package is not defined with type module. We might want to change that at some point.
The text was updated successfully, but these errors were encountered: