-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
125 lines (125 loc) · 4.37 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*
* Copyright 2020 Phenix Real Time Solutions, Inc. Confidential and Proprietary. All Rights Reserved.
*/
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 10,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"es6": true,
"commonjs": true,
"jest": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:jsx-a11y/recommended"
],
"plugins": [
"jsx-a11y",
"lodash",
"notice"
],
"rules" : {
// Possible Errors - http://eslint.org/docs/rules/#possible-errors
"no-console": 0,
// Best Practices - http://eslint.org/docs/rules/#best-practices
"curly": 2,
"default-case": 2,
"eqeqeq": 2,
"no-alert": 2,
"no-else-return": 2,
"no-multi-spaces": 2,
"yoda": 2,
// Stylistic Issues - http://eslint.org/docs/rules/#stylistic-issues
"array-bracket-newline": [0, { "": null }],
"array-bracket-spacing": 0,
"block-spacing": 2,
"brace-style": 2,
"camelcase": [2, {"properties": "never"}],
"capitalized-comments": [2, "always", { "ignoreConsecutiveComments": true, "ignoreInlineComments": true }],
"comma-dangle": [2, {
"arrays": "never",
"objects": "never",
"imports": "never",
"exports": "never",
"functions": "ignore"
}],
"comma-spacing": [2, { "before": false, "after": true }],
"comma-style": [2, "last"],
"computed-property-spacing": [2, "never"],
"eol-last": [2, "never"],
"func-call-spacing": [2, "never"],
"func-names": [2, "never"],
"key-spacing": [2, {"beforeColon": false}],
"keyword-spacing": 2,
"new-parens": 2,
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-trailing-spaces": 2,
"object-curly-newline": [2, { "multiline": true }],
"object-curly-spacing": [2, "never"],
"object-property-newline": 2,
"padded-blocks": ["error", "never"],
"padding-line-between-statements": [2,
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": "*", "next": "if" },
{ "blankLine": "always", "prev": "*", "next": "throw" },
{ "blankLine": "always", "prev": "function", "next": ["function", "block-like", "multiline-block-like"] },
{ "blankLine": "always", "prev": "class", "next": "*" },
{ "blankLine": "any", "prev": ["const", "let"], "next": ["const", "let"] },
{ "blankLine": "always", "prev": "block-like", "next": "*" },
{ "blankLine": "always", "prev": "block", "next": "*" },
{ "blankLine": "always", "prev": "multiline-block-like", "next": "*" },
{ "blankLine": "always", "prev": "expression", "next": "*" },
{ "blankLine": "any", "prev": "expression", "next": "expression" }
],
"prefer-arrow-callback": [ 2, { "allowNamedFunctions": false, "allowUnboundThis": false } ],
"arrow-spacing": ["error", { "before": true, "after": true }],
"quote-props": ["error", "as-needed"],
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
"semi": [2, "always"],
"spaced-comment": [2, "always"],
"space-before-function-paren": ["error", "never"],
"space-infix-ops": ["error", {"int32Hint": false}],
"space-in-parens": ["error", "never"],
// Lodash rules
"lodash/callback-binding": 2,
"lodash/chaining": 0,
"lodash/chain-style": 0,
"lodash/collection-method-value": 2,
"lodash/collection-return": 2,
"lodash/matches-prop-shorthand": 0,
"lodash/no-commit": 0,
"lodash/path-style": [2, "array"],
"lodash/prefer-constant": 0,
"lodash/prefer-lodash-method": 0,
"lodash/prefer-noop": 0,
"lodash/preferred-alias": 0,
"lodash/prefer-map": 0,
"lodash/prefer-invoke-map": 0,
"lodash/prefer-filter": 0,
"lodash/prop-shorthand": 0,
// Rules specific to this module
"indent": ["error", 2, { "SwitchCase": 1 }],
"jsx-quotes": [2, "prefer-double"],
"no-tabs": 2,
"notice/notice":["error", {
"mustMatch": "Copyright 2020 Phenix Real Time Solutions, Inc.",
"templateFile": "copyright.tmpl",
"onNonMatchingHeader": "replace"
}]
},
"settings": {
"propWrapperFunctions": [
// The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.
"forbidExtraProps",
{"property": "freeze", "object": "Object"}
]
}
}