-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
75 lines (74 loc) · 2.81 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
69
70
71
72
73
74
75
module.exports = {
root: true,
env: {
node: true
},
extends: ["plugin:vue/essential", "@vue/standard"],
parserOptions: {
parser: "babel-eslint"
},
rules: {
"linebreak-style": [2, "unix"],
semi: 0,
"semi-spacing": [
2,
{
// http://eslint.org/docs/rules/semi-spacing
before: false,
after: true
}
],
"no-catch-shadow": 2, // disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment)
"no-delete-var": 2, // disallow deletion of variables
"no-label-var": 2, // disallow labels that share a name with a variable
"no-shadow": 2, // disallow declaration of variables already declared in the outer scope
"no-shadow-restricted-names": 2, // disallow shadowing of names such as arguments
"no-undef": 0, // disallow use of undeclared variables unless mentioned in a /*global */ block
"no-undef-init": 2, // disallow use of undefined when initializing variables
"no-unused-vars": ["error", { vars: "local", args: "after-used" }], // disallow declaration of variables that are not used in the code
"no-use-before-define": 2, // disallow use of variables before they are defined
complexity: 0, // specify the maximum cyclomatic complexity allowed in a program (off by default)
"no-var": 2, // require let or const instead of var (off by default)
"no-multiple-empty-lines": 0,
"no-nested-ternary": 2, // http://eslint.org/docs/rules/no-nested-ternary
"no-new-object": 2, // http://eslint.org/docs/rules/no-new-object
"no-spaced-func": 2, // http://eslint.org/docs/rules/no-spaced-func
"no-trailing-spaces": 2, // http://eslint.org/docs/rules/no-trailing-spaces
"no-extra-parens": [2, "functions"], // http://eslint.org/docs/rules/no-extra-parens
"no-underscore-dangle": 0, // http://eslint.org/docs/rules/no-underscore-dangle
"one-var": [2, "never"], // http://eslint.org/docs/rules/one-var
quotes: 0,
"no-prototype-builtins": 0,
"no-extend-native": 0,
"padded-blocks": 0,
"arrow-parens": 0,
"generator-star-spacing": 0,
camelcase: 0,
"no-console": 0,
"new-cap": 0,
"no-unused-expressions": 0,
"no-return-assign": 0,
"vue/*": 0,
"vue/no-parsing-error": 0,
"vue/html-indent": 0,
"vue/this-in-template": 0,
"vue/valid-v-for": 0,
"vue/valid-v-bind": 0,
"vue/no-unused-components": 0,
"space-before-function-paren": 0,
// allow debugger during development
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)"
],
env: {
mocha: true
}
}
]
};