-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
.eslintrc.js
84 lines (78 loc) · 2.34 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
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution")
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
"vue/setup-compiler-macros": true,
node: true,
},
extends: [
"plugin:vue/vue3-essential",
"plugin:prettier/recommended",
"plugin:vue/essential",
"@vue/prettier",
"eslint:recommended",
"plugin:vue/recommended",
"@vue/eslint-config-typescript/recommended",
"@vue/eslint-config-prettier",
],
parserOptions: {
parser: "@typescript-eslint/parser",
ecmaVersion: 2020,
sourceType: "module",
},
rules: {
// "vue/js-uses-vars": "error",
indent: ["error", 4],
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
"no-empty": "warn",
"no-cond-assign": ["error", "always"],
// refactor maximum line length
"max-len": ["warn", { code: 120, ignoreUrls: true }],
// empty line around comment
"lines-around-comment": [
"error",
{
beforeBlockComment: true,
afterBlockComment: false,
beforeLineComment: true,
afterLineComment: false,
allowBlockStart: true,
allowBlockEnd: true,
allowObjectStart: true,
allowObjectEnd: true,
allowArrayStart: true,
allowArrayEnd: true,
},
],
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"prettier/prettier": [
"warn",
{
semi: false,
trailingComma: "es5",
},
],
// disable rules from base configurations
"for-direction": "off",
"init-declarations": "off",
"no-inline-comments": "off",
},
overrides: [
{
files: ["cypress/integration/**.spec.{js,ts,jsx,tsx}"],
extends: ["plugin:cypress/recommended"],
},
{
files: ["bin/*.js", "lib/*.js"],
excludedFiles: "*.test.js",
rules: {
quotes: ["warn", "single"],
},
},
],
}