-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
53 lines (53 loc) · 2.05 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
{
"extends": ["xo", "xo/browser"],
"env": {
"browser": true,
"es6": true,
"greasemonkey": true,
"jasmine": true,
"node": false,
"protractor": true
},
"rules": {
// Require trailing commas in multiline object literals (match eslint-config-airbnb-base)
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline"
}],
"consistent-return": "error",
"func-names": "warn",
// Match indent config of eslint-config-airbnb-base
"indent": ["error", 2, {
"SwitchCase": 1,
"FunctionDeclaration": {
// Angular uses a bunch of parameters leading to a bunch of wrapping. Indent to first param
"parameters": "first"
},
"FunctionExpression": {
// Angular uses a bunch of parameters leading to a bunch of wrapping. Indent to first param
"parameters": "first"
},
// list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js
"ignoredNodes": ["JSXElement", "JSXElement > *", "JSXAttribute", "JSXIdentifier", "JSXNamespacedName", "JSXMemberExpression", "JSXSpreadAttribute", "JSXExpressionContainer", "JSXOpeningElement", "JSXClosingElement", "JSXText", "JSXEmptyExpression", "JSXSpreadChild"]
}],
"max-len": ["error", 100, 2, {
"ignoreUrls": true,
"ignoreComments": false,
"ignoreRegExpLiterals": true,
"ignoreStrings": true
}],
"no-extra-parens": ["error", "all", {
"nestedBinaryExpressions": false
}],
"object-curly-spacing": ["error", "always"],
"operator-linebreak": ["error", "before", { "overrides": { "=": "none" } }],
"require-jsdoc": "warn",
"sort-keys": ["warn", "asc", {"caseSensitive": false, "natural": true}],
"valid-jsdoc": ["error", {
"requireReturn": false,
"prefer": {
"returns": "return"
}
}]
}
}