demarches-normaliennes/.eslintrc.js

65 lines
1.3 KiB
JavaScript
Raw Normal View History

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
globals: {
2022-02-02 17:16:50 +01:00
process: true,
gon: true
},
plugins: ['prettier', 'react-hooks'],
2022-02-02 17:16:50 +01:00
extends: [
'eslint:recommended',
'prettier',
'plugin:react/recommended',
'plugin:react-hooks/recommended'
],
env: {
2018-10-16 10:49:00 +02:00
es6: true,
browser: true
},
rules: {
'prettier/prettier': 'error',
2022-02-02 17:16:50 +01:00
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
2022-02-02 17:16:50 +01:00
'react/prop-types': 'off'
},
settings: {
react: {
version: 'detect'
}
2018-09-12 10:40:12 +02:00
},
overrides: [
{
2022-02-02 17:16:50 +01:00
files: [
'.eslintrc.js',
'config/webpack/**/*.js',
'babel.config.js',
'postcss.config.js'
],
2018-09-12 10:40:12 +02:00
env: {
node: true
}
2022-02-02 17:16:50 +01:00
},
{
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'
}
2018-09-12 10:40:12 +02:00
}
]
};