-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
55 lines (53 loc) · 1.23 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
55
const path = require('path');
const resolvePath = (p) => path.resolve(__dirname, p);
module.exports = {
env: {
browser: true,
es2021: true,
jquery: true,
node: true,
'jest/globals': true,
},
globals: {
process: true,
},
extends: [
'plugin:import/recommended',
'plugin:react/recommended',
'airbnb',
'prettier',
],
overrides: [],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
settings: {
'import/resolver': {
alias: {
extensions: ['.js', '.jsx'],
map: [
['@components', resolvePath('./js/components')],
['@state', resolvePath('./js/state')],
['@lib', resolvePath('./js/lib')],
['@hooks', resolvePath('./js/hooks')],
['@static', resolvePath('./static')],
],
},
},
},
plugins: ['react', 'jest'],
rules: {
'no-console': 'error',
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'react/prop-types': 'off',
camelcase: 'off',
'import/no-cycle': 'off',
'import/prefer-default-export': 'off',
'react/jsx-props-no-spreading': 'off',
'no-unused-expressions': [
'error',
{ allowShortCircuit: true, allowTernary: true },
],
},
};