-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
30 lines (29 loc) · 920 Bytes
/
.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
module.exports = {
parser: 'babel-eslint',
extends: ['airbnb', 'prettier', 'prettier/react'],
plugins: ['prettier', 'react'],
env: {
browser: true,
},
settings: {
'import/resolver': {
node: {
moduleDirectory: ['node_modules', 'src'],
},
},
},
rules: {
// prettier overrides
'prettier/prettier': 'error',
// we use bind
'react/jsx-no-bind': 'off',
// we use only .js extension
'react/jsx-filename-extension': ['error', { extensions: ['.js'] }],
// allow create components without prop-types check
'react/prop-types': ['error', { skipUndeclared: true }],
// allow console.error & console.warning
'no-console': ['error', { allow: ['warn', 'error'] }],
// we use '_' placeholder, for example in array desctruction: [_, second] = arr
'no-unused-vars': ['error', { varsIgnorePattern: '^_+', argsIgnorePattern: '^_+' }],
},
};