-
-
Notifications
You must be signed in to change notification settings - Fork 196
/
.eslintrc.js
63 lines (61 loc) · 1.58 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
require("@rushstack/eslint-patch/modern-module-resolution");
const path = require("node:path");
const createAliasSetting = require("@vue/eslint-config-airbnb/createAliasSetting");
module.exports = {
root: true,
env: {
es2021: true,
},
extends: ["plugin:vue/recommended", "@vue/eslint-config-airbnb", "prettier"],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"no-plusplus": "off",
"import/no-cycle": "off",
"vue/valid-v-slot": [
"error",
{
allowModifiers: true,
},
],
"no-param-reassign": "off",
"import/no-unresolved": "error",
// This is probably a good idea, but I don't want to diverge all the file names right now
// while maintaining 4.x and 5.x.
"vue/multi-word-component-names": "off",
"vue/max-len": [
"error",
{
code: 120,
ignoreComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
ignoreUrls: true,
},
],
"no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"prefer-destructuring": ["error", { object: true, array: false }],
},
settings: {
...createAliasSetting({
"@": `${path.resolve(__dirname, "./src")}`,
}),
},
parserOptions: {},
overrides: [
{
files: ["**/__tests__/*.{j,t}s?(x)"],
env: {
mocha: true,
},
},
],
};