-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy path.eslintrc.js
46 lines (46 loc) · 1.12 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
module.exports = {
parser: "vue-eslint-parser",
parserOptions: {
ecmaVersion: 2018
},
// Allow Node style require and other node-based functions
env: {
node: true,
browser: true,
commonjs: true,
jest: true,
es6: true
},
extends: [
// add more generic rulesets here, such as:
"eslint:recommended",
"plugin:vue/recommended"
],
plugins: [
"vue"
],
ignorePatterns: ["dist/", "node_modules/", "*.json", ".temp/"],
rules: {
// Rules to ignore
"vue/multi-word-component-names": "off",
"no-use-before-define": "off", // Vuepress has hidden logic
"no-case-declarations": "off",
"no-unused-vars": "off",
"no-console": "off",
"no-empty": "off",
"no-prototype-builtins": "off",
"guard-for-in": "off",
// Rules to warn
indent: ["warn", 2, { SwitchCase: 1 }],
// Rules to error
curly: "error",
"semi-spacing": "error",
"no-unneeded-ternary": "error",
"no-useless-concat": "error",
"no-useless-return": "error",
"no-multi-spaces": "error",
"no-alert": "error",
"no-eq-null": "error",
"no-eval": "error"
}
};