-
Notifications
You must be signed in to change notification settings - Fork 13
/
.eslintrc
78 lines (78 loc) · 2.97 KB
/
.eslintrc
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
"parser": "babel-eslint",
"rules": {
"quotes": 0,
"no-trailing-spaces": 0,
"eqeqeq": 0,
"no-underscore-dangle": 0,
"no-undef": 0,
"no-extra-boolean-cast": 0,
"no-mixed-spaces-and-tabs": 0,
"no-alert": 0,
"no-shadow": 0,
"no-empty": 0,
"no-irregular-whitespace": 0,
"no-multi-spaces": 0,
"no-new": 0,
"no-unused-vars": 2, // disallow declaration of variables that are not used in the code
"no-redeclare": 2, // disallow declaring the same variable more then once
"new-cap": 0,
//
// eslint-plugin-react
//
// React specific linting rules for ESLint
//
//"react/display-name": 0, // Prevent missing displayName in a React component definition
"react/jsx-boolean-value": [2, "always"], // Enforce boolean attributes notation in JSX
"react/jsx-no-undef": 2, // Disallow undeclared variables in JSX
"react/jsx-quotes": 0,
"react/jsx-sort-prop-types": 0, // Enforce propTypes declarations alphabetical sorting
"react/jsx-sort-props": 0, // Enforce props alphabetical sorting
"react/jsx-uses-react": 2, // Prevent React to be incorrectly marked as unused
"react/jsx-uses-vars": 2, // Prevent variables used in JSX to be incorrectly marked as unused
//"react/no-did-mount-set-state": 2, // Prevent usage of setState in componentDidMount
"react/no-did-update-set-state": 2, // Prevent usage of setState in componentDidUpdate
"react/no-multi-comp": 0, // Prevent multiple component definition per file
"react/no-unknown-property": 2, // Prevent usage of unknown DOM property
"react/prop-types": 2, // Prevent missing props validation in a React component definition
"react/react-in-jsx-scope": 2, // Prevent missing React when using JSX
"react/self-closing-comp": 2, // Prevent extra closing tags for components without children
},
"globals": {
"jQuery": true,
"$": true,
"reveal": true,
"Pikaday": true,
"NProgress": true,
"cytoscape": true
},
"plugins": ["react"],
"ecmaFeatures": {
"arrowFunctions": true,
"binaryLiterals": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"octalLiterals": true,
"regexUFlag": true,
"regexYFlag": true,
"spread": true,
"superInFunctions": true,
"templateStrings": true,
"unicodeCodePointEscapes": true,
"globalReturn": true,
"jsx": true
},
"env": {
"browser": true,
"es6": true
}
}