demarches-normaliennes/.eslintrc.js

58 lines
1.1 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/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'
]
2018-09-12 10:40:12 +02:00
}
]
};