-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
56 lines (51 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
55
56
module.exports = {
extends: [
'eslint:recommended',
'plugin:react/recommended',
],
env: {
browser: true,
node: true,
es6: true,
jest: true,
},
parser: "babel-eslint", // Fix: Parsing error: Unexpected token = in "static propTypes = {"
parserOptions: {
ecmaVersion: 10,
sourceType: "module",
ecmaFeatures: {
impliedStrict: true,
jsx: true,
}
},
plugins: [ 'react' ],
// https://github.com/yannickcr/eslint-plugin-react
settings: {
react: {
pragma: "React",
version: "detect",
}
},
globals: {},
/**
* ERROR Level: Severity should be one of the following:
* 0 = off | 1 = warn | 2 = error
*/
rules: {
'comma-dangle': [2, {
arrays: 'only-multiline',
objects: 'only-multiline',
imports: 'only-multiline',
exports: 'only-multiline',
functions: 'only-multiline'
}],
'eqeqeq': 'error', // require use of explicit equality comparators - "===", "!=="
'indent': ['error', 2, { 'SwitchCase': 2 }],
'object-curly-spacing': ['error', 'always'],
'no-console': 'warn',
'no-debugger': 'warn',
'no-trailing-spaces': 'error',
'no-unused-vars': ['error', { 'vars': 'all', 'args': 'none' }],
'no-var': 'error', // ES6: This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.
}
}