39 lines
953 B
JavaScript
39 lines
953 B
JavaScript
import globals from 'globals'
|
|
import pluginJs from '@eslint/js'
|
|
import pluginReact from 'eslint-plugin-react'
|
|
import reactCompiler from 'eslint-plugin-react-compiler'
|
|
import eslintConfigPrettier from 'eslint-config-prettier'
|
|
|
|
/** @type {import('eslint').Linter.Config[]} */
|
|
export default [
|
|
{
|
|
files: ['**/*.{js,mjs,cjs,jsx}'],
|
|
languageOptions: {
|
|
...pluginReact.configs.flat.recommended.languageOptions,
|
|
globals: {
|
|
...globals.browser,
|
|
process: 'readonly'
|
|
}
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: '16'
|
|
}
|
|
},
|
|
plugins: {
|
|
'react-compiler': reactCompiler
|
|
}
|
|
},
|
|
pluginJs.configs.recommended,
|
|
pluginReact.configs.flat.recommended,
|
|
{
|
|
rules: {
|
|
'no-unused-vars': 'off',
|
|
'react/prop-types': 'off',
|
|
'react/display-name': 'off',
|
|
'react/no-unescaped-entities': 'off',
|
|
'react-compiler/react-compiler': 'warn'
|
|
}
|
|
},
|
|
eslintConfigPrettier
|
|
]
|