-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
63 lines (58 loc) · 1.23 KB
/
index.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
const rootDir = process.cwd();
module.exports = {
extends: [
"airbnb-base", // Extends Airbnb Base
"plugin:prettier/recommended" // Extends Prettier
],
settings: {
"import/resolver": {
webpack: {
config: {
resolve: {
extensions: [".js", ".vue"],
alias: {
"~": rootDir,
"@": rootDir
}
}
}
}
}
},
rules: {
"import/extensions": [
"error",
"always",
{
// .js and .vue always removed.
js: "never",
vue: "never"
}
],
// allow debugger during development
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
// allow add extra comma when multiline
"comma-dangle": [2, "only-multiline"],
// prettier config
"prettier/prettier": [
"error",
{
trailingComma: "all",
printWidth: 80,
singleQuote: true,
semi: false
}
],
// if tag has >= 2 attributes, each attributes must write on per line.
"vue/max-attributes-per-line": [
2,
{
singleline: 1,
multiline: {
max: 1,
allowFirstLine: false
}
}
]
}
};