-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
53 lines (52 loc) · 1.41 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
const path = require('path')
module.exports = {
extends: [
'standard',
'plugin:react/recommended',
'prettier'
],
parser: 'babel-eslint',
plugins: ['standard', 'promise', 'import', 'react', 'jsx-a11y'],
env: {
mocha: true,
node: true,
browser: true,
es6: true,
jquery: true
},
globals: {
expect: false,
jest: false
},
rules: {
'import/extensions': 0,
'no-useless-escape': 0,
'no-useless-return': 0,
camelcase: 0,
'prefer-const': 1,
// TODO(elstonayx): Set prop-types rule to 2 when we migrate to TS.
'react/prop-types': [1, { ignore: ['className'] }],
'no-multi-spaces': [2, { ignoreEOLComments: true }],
'import/no-webpack-loader-syntax': 0,
'no-use-before-define': [0],
'no-duplicate-imports': 0,
'react/no-deprecated': 0,
semi: ['error', 'never'],
quotes: ['error', 'single', { avoidEscape: true }],
'comma-dangle': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/img-has-alt': [0],
'jsx-a11y/href-no-hash': 'off',
'jsx-a11y/anchor-is-valid': ['warn', { aspects: ['invalidHref'] }],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
optionalDependencies: false,
peerDependencies: false,
packageDir: path.join(__dirname)
}
]
}
}