-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
68 lines (64 loc) · 1.91 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
57
58
59
60
61
62
63
64
65
66
67
68
exports = module.exports = {
"extends": [
"airbnb-base"
],
"plugins": [
// TODO: this is LINT rules for DOC. `Use with npm install eslint-plugin-jsdoc`
"jsdoc"
],
"parserOptions": {
"sourceType": "script" // required to set "strict mode" explicitly
},
"rules": {
"strict": ["error", "global"],
"dot-notation": "off",
// code style
"arrow-parens": ["error", "as-needed", { "requireForBlockBody": true }],
"indent": ["warn", "tab"],
"max-classes-per-file": ["error", 15],
"no-else-return": ["error", { "allowElseIf": true }],
"no-tabs": "off",
"import/no-useless-path-segments": "off",
"semi": ["error", "never"],
"yoda": ["error", "always"],
"no-multi-spaces": "off", // TODO: stop ignoring, set a rule
"quote-props": "off", // TODO: stop ignoring, set a rule
// double quotes (JSON love ", and not ')
// and we like to copypaste time to time
"quotes": ["warn", "double"],
"no-underscore-dangle": "off",
"comma-dangle": ["error", {
"arrays": "only-multiline",
"objects": "only-multiline",
"imports": "only-multiline",
"exports": "only-multiline",
"functions": "ignore",
}],
// TODO: this is LINT rules for DOC. `Use with npm install eslint-plugin-jsdoc`
//"jsdoc/check-param-names": 1,
//"jsdoc/check-tag-names": "warn",
"jsdoc/check-tag-names": [
"warn",
{ "definedTags": ["category", "tag"] }
],
// "jsdoc/check-types": 1,
// "jsdoc/newline-after-description": 1,
// "jsdoc/require-description-complete-sentence": 1,
// "jsdoc/require-hyphen-before-param-description": 1,
"jsdoc/require-param": "warn",
// "jsdoc/require-param-description": 1,
// "jsdoc/require-param-type": 1,
// "jsdoc/require-returns-description": 1,
// "jsdoc/require-returns-type": 1
},
"settings": {
"jsdoc": {
"tagNamePreference": {
"returns": "return"
// },
// "additionalTagNames": {
// "customTags": ["category", "tag"]
}
}
}
}