-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
124 lines (113 loc) · 2.98 KB
/
.eslintrc.cjs
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parserOptions: {
ecmaVersion: 2020,
},
overrides: [
{
files: ["*.ts", "*.tsx"],
parserOptions: {
project: ["./tsconfig.json"],
},
},
{
files: ["**/__tests__/*.{j,t}s?(x)", "**/tests/unit/**/*.spec.{j,t}s?(x)"],
},
],
ignorePatterns: ["cypress/**/*", "cypress.config.ts", "backend"],
extends: [
"plugin:vue/vue3-essential",
"plugin:vue/vue3-recommended",
"@vue/airbnb",
"@vue/eslint-config-typescript/recommended",
"plugin:prettier-vue/recommended",
],
plugins: [
// required to lint *.vue files
"vue",
],
settings: {
"import/resolver": {
typescript: {},
},
},
// add your custom rules here
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : 1,
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"no-empty": [
"error",
{
allowEmptyCatch: true,
},
],
"no-param-reassign": [
"error",
{
props: true,
ignorePropertyModificationsFor: [
"acc", // for reduce accumulators
"e", // for e.returnvalue
],
},
],
// false-positive errors, so offed for now
"vue/no-setup-props-destructure": "off",
"no-unused-vars": "off",
"no-useless-catch": "off",
"no-underscore-dangle": "off",
"no-restricted-syntax": "off",
"no-plusplus": "off",
"no-shadow": "off",
"import/extensions": "off",
"import/no-named-as-default": "off",
"import/prefer-default-export": "off",
"import/no-dynamic-require": "off",
"import/no-unresolved": [
"error",
{
ignore: [".svg"],
},
],
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
"arrow-body-style": "warn",
"func-names": [1, "as-needed"],
"class-methods-use-this": "off",
"arrow-parens": "off",
"global-require": "off",
"max-len": "off",
"prefer-destructuring": "off",
"vue/no-v-for-template-key": "off",
"vue/max-len": [
"warn",
{
code: 100,
template: 100,
tabWidth: 2,
comments: 100,
ignorePattern: "",
ignoreComments: false,
ignoreTrailingComments: false,
ignoreUrls: false,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
ignoreHTMLAttributeValues: false,
ignoreHTMLTextContents: false,
},
],
"vue/no-unused-components": "warn",
"vue/multi-word-component-names": "off",
"vue/no-reserved-component-names": "off",
"vuejs-accessibility/click-events-have-key-events": "off",
"vuejs-accessibility/form-control-has-label": "off",
"vuejs-accessibility/no-autofocus": "off",
"vuejs-accessibility/label-has-for": "off",
"vue/component-definition-name-casing": [1, "kebab-case"],
"vue/no-deprecated-router-link-tag-prop": "warn",
},
};