-
Notifications
You must be signed in to change notification settings - Fork 12
/
.eslintrc.js
54 lines (54 loc) · 1.36 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
const path = require('path');
module.exports = {
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
configFile: path.join(__dirname, 'babel.config.js'),
},
},
env: {
es6: true,
browser: true,
node: true,
'cypress/globals': true,
},
settings: {
react: {
version: 'detect',
},
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:react/recommended',
'plugin:jest/style',
'prettier',
],
plugins: ['import', 'react', 'prettier', 'cypress', 'jest'],
ignorePatterns: ['src/themes/**/*.js', 'src/app/custom/themes/**/js/*.js'],
rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
tabWidth: 4,
trailingComma: 'all',
},
],
'import/no-extraneous-dependencies': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-unused-vars': ['error', { ignoreRestSiblings: true }],
},
globals: {
process: true,
__DEBUG__: true,
LOADERS: true,
__EN__: true,
__FR__: true,
ISTEX_API_URL: true,
jest: true,
beforeAll: true,
afterAll: true,
},
};