-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
88 lines (86 loc) · 2.68 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
76
77
78
79
80
81
82
83
84
85
86
87
88
module.exports = {
root: true,
env: {
node: true
},
"plugins": [
"no-es2015"
],
extends: [
'plugin:vue/recommended',
'eslint:recommended'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-unused-vars': ["error", { "args": "none" }],
"semi": "error",
"no-trailing-spaces": "error",
"comma-dangle": ["error", "never"],
"quotes": ["error", "single"],
"no-template-curly-in-string": "error",
"vue/max-attributes-per-line": ["error", { "singleline": 3 }],
"vue/html-closing-bracket-newline": "error",
"vue/html-closing-bracket-spacing": "error",
"vue/prop-name-casing": "error",
"require-jsdoc": ["warn", {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": false,
"FunctionExpression": false
}
}],
"valid-jsdoc": ["error", {
"requireReturn": false,
"prefer": {
"arg": "param",
"argument": "param",
"augments": "extends",
"class": "constructor",
"const": "constant",
"defaultvalue": "default",
"desc": "description",
"exception": "throws",
"file": "fileoverview",
"fires": "emits",
"func": "function",
"host": "external",
"linkcode": "link",
"linkplain": "link",
"method": "function",
"overview": "fileoverview",
"prop": "property",
"return": "returns",
"var": "member",
"virtual": "abstract",
"yield": "yields"
},
"preferType": {
"Boolean": "boolean",
"Number": "number",
"Object": "object",
"String": "string"
}
}],
// Don't use ES2015 at all, so we don't need a transpiler like Babel.
// This reduces the bundle size dramatically.
"no-es2015/no-object-computed-properties": "error",
"no-es2015/no-object-shorthand-properties": "error",
"no-es2015/no-object-shorthand-method": "error",
"no-es2015/only-var": "error",
"no-es2015/no-destructuring-assignment": "error",
"no-es2015/no-destructuring-params": "error",
"no-es2015/no-class": "error",
"no-es2015/no-default-params": "error",
"no-es2015/no-spread-element": "error",
"no-es2015/no-rest-params": "error",
"no-es2015/no-generator-function": "error",
"no-es2015/no-arrow-func": "error",
"no-es2015/no-for-of": "error",
"no-es2015/no-template-string": "error",
// using import is allowed, since webpack gets rid of it automatically
"no-es2015/no-import": "off"
}
}