forked from LouisMazel/maz-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
96 lines (95 loc) · 2.08 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
89
90
91
92
93
94
95
96
module.exports = {
root: true,
env: {
browser: true,
node: true
},
extends: [
"plugin:vue/strongly-recommended",
"eslint:recommended"
],
plugins: ["vue"],
parserOptions: {
parser: "babel-eslint"
},
rules: {
// ESLINT RULES
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"arrow-parens": 0,
semi: ["error", "never"],
quotes: ["error", "single"],
"func-style": "error",
"max-len": [
"warn",
{
code: 200
}
],
"no-unused-vars": ["error"],
"no-undef": ["error", { typeof: true }],
"no-loop-func": "warn",
indent: [
"error",
2,
{
ignoredNodes: ["TemplateLiteral"]
}
],
"space-before-function-paren": ["error", "always"],
"template-curly-spacing": "off",
// VUE RULES
"vue/max-attributes-per-line": [
"error",
{
singleline: 1,
multiline: {
max: 1,
allowFirstLine: false
}
}
],
"vue/html-self-closing": [
"error",
{
html: {
void: "any"
}
}
],
"vue/html-indent": [
"error",
2,
{
baseIndent: 1
}
],
"vue/script-indent": ["error", 2, { baseIndent: 1 }],
"vue/component-name-in-template-casing": ["error", "PascalCase"],
"vue/attributes-order": "error",
"vue/no-confusing-v-for-v-if": "error",
"vue/no-v-html": "error",
"vue/order-in-components": "error",
"vue/this-in-template": "error",
"vue/script-indent": "error"
}
};
// 'generator-star-spacing': 0,
// 'arrow-parens': 0,
// 'prefer-const': 2,
// 'no-trailing-spaces': 'error',
// indent: ['error', 2, {
// ignoredNodes: ['TemplateLiteral']
// }],
// 'template-curly-spacing': 'off'
// },
// overrides: [
// {
// files: ['*.vue'],
// rules: {
// indent: 'off',
// 'vue/script-indent': ['error', 2, { baseIndent: 1 }],
// 'vue/component-name-in-template-casing': ['error', 'PascalCase']
// }
// }
// ]