-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
66 lines (65 loc) · 2.14 KB
/
.eslintrc.json
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
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": "fullstack",
"rules": {
// Uncomment this when making the linter more strict to hide the todo comments from the eslint output
// "no-warning-comments": ["off"],
"eqeqeq": ["error"],
"guard-for-in": ["error"],
"no-case-declarations": ["error"],
"no-confusing-arrow": ["error"],
"no-duplicate-imports": ["error"],
"no-alert": ["error"],
"no-console": ["error"],
"max-params": ["error"],
"camelcase": ["off"],
"no-use-before-define": ["off"], // Let and const handle this properly, the rule isn't really necessary
"react/no-array-index-key": ["off"], // We were ignoring this anyway
"no-nested-ternary": ["off"], // We were ignoring this anyway
// This enforces camelCasing or ALL_CAPS_WITH_UNDERSCORES but allows an _id suffix
"id-match": [
"error",
"^(([A-Za-z_$][A-Za-z0-9]*(_id)?_?)|([A-Z_]+))$",
{
"properties": true
}
],
"arrow-parens": ["error", "always"],
"semi": ["error", "always"],
"indent": [
"error",
"tab",
{ "SwitchCase": 1 }
],
"space-infix-ops": ["error"],
"no-shadow": ["error"],
"no-trailing-spaces": ["error"],
"eol-last": ["error"],
"no-undef": ["error"],
"no-unused-expressions": ["warn"],
"id-length": ["off"],
"react/prop-types": ["off"],
"no-return-assign": ["error"],
"keyword-spacing": ["error"],
"object-curly-spacing": ["error", "always"],
"new-cap": [
"error",
{
"capIsNewExceptionPattern": "^Sequelize\\.[A-Z]+$"
}
],
/*
This disallows unused variables. This is one of those code smells which can improve performance as every variable
takes up memory. It also catches extra imports which you've added at the top of the file which you aren't using
*/
"no-unused-vars": ["error"],
/*
This disallows functions to be too logically complicated. This can help prompt you to break a function down since
functions which break this rule often times really shouldn't be one big function
*/
"complexity": ["error"]
}
}