-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy path.eslintrc
67 lines (51 loc) · 1.73 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
{
"env": {
"es6": true,
"mocha": true
},
"extends": [
"airbnb-base",
"plugin:vue/essential"
],
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "babel-eslint",
"sourceType": "module"
},
"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"],
// allow require in all sorts of places
"global-require": 0,
// always indent with one tab, including switch statements
"indent": [1, "tab", { "SwitchCase": 1 }],
// don"t worry about line endings
"linebreak-style": 0,
// warn for any line over 140 chars
"max-len": [1, 140],
// 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"],
// allow us to use webpack while installing it as a devDepencdency
"import/no-extraneous-dependencies": 0,
// arrow functions don't need a consistent return type for all code paths
"consistent-return": 0
}
}