You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the time of writing this, eslint only supports js extension for the flat config file. However, mjs and cjs 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:
Once all pieces involved support flat config, the new config file should look something on these lines:
consttseslint=require('typescript-eslint');consthypothesis=require('eslint-config-hypothesis');constjsxA11Y=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},});
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: