demarches-normaliennes/.eslintrc.js
Paul Chavard 44c64669e9 Revert "Merge pull request #6787 from tchak/use-vite"
This reverts commit 5d572727b5, reversing
changes made to 43be4482ee.
2022-03-31 12:07:52 +02:00

65 lines
1.4 KiB
JavaScript

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
globals: {
process: true,
gon: true
},
plugins: ['prettier', 'react-hooks'],
extends: [
'eslint:recommended',
'prettier',
'plugin:react/recommended',
'plugin:react-hooks/recommended'
],
env: {
es6: true,
browser: true
},
rules: {
'prettier/prettier': 'error',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'react/prop-types': 'off'
},
settings: {
react: {
version: 'detect'
}
},
overrides: [
{
files: [
'.eslintrc.js',
'config/webpack/**/*.js',
'babel.config.js',
'postcss.config.js'
],
env: {
node: true
}
},
{
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'prettier'
],
rules: {
'prettier/prettier': 'error',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': 'error'
}
}
]
};