forked from HPInc/davinci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
80 lines (63 loc) · 1.95 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
{
"extends": [
"airbnb-base",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint"
],
"plugins": ["@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaVersion": 2018,
"sourceType": "module"
},
"env": {
"es6": true,
"node": true,
"mocha": true
},
"rules": {
// only apply parens to arrow functions when there are multiple args
"arrow-parens": [2, "as-needed"],
// never have trailing commas
"comma-dangle": [2, "never"],
// always indent with one tab, including switch statements
"indent": [1, "tab", { "SwitchCase": 1 }],
// do not error on linebreak style
"linebreak-style": 0,
// warn for any line over 120 chars
"max-len": [1, 120],
// class constructors must start with a capital letter, allows Router and Object ID without 'new'
"new-cap": [2, { "capIsNewExceptions": ["Router", "ObjectId"] }],
// don't allow modification of any input parameters
"no-param-reassign": [2, { "props": false }],
// allow the ++ operator
"no-plusplus": 0,
// disallow underscore dangle with the exceptions '_id' & '__v'
"no-underscore-dangle": [2, { "allow": ["_id", "__v"] }],
// allow tabs!
"no-tabs": 0,
// allow objects to be defined on a single line
"object-curly-newline": 0,
// use object shorthand wherever possible
"object-shorthand": ["error", "always"],
// allow indentation regardless of blank lines above and below
"padded-blocks": 0,
// ensure properties are either consistently in / without qutoes as needed
"quote-props": [2, "consistent-as-needed"],
"@typescript-eslint/interface-name-prefix": 0,
"@typescript-eslint/ban-ts-ignore": 1,
"import/prefer-default-export": 0,
"prefer-destructuring": "warn"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}