generated from M-Media-Group/Vue3-SPA-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
103 lines (102 loc) · 2.37 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
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution");
module.exports = {
root: true,
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-typescript",
"@vue/eslint-config-prettier",
"plugin:storybook/recommended",
],
overrides: [
{
files: ["cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}"],
extends: ["plugin:cypress/recommended"],
},
],
parserOptions: {
ecmaVersion: "latest",
},
plugins: ["unused-imports", "spellcheck", "no-secrets"],
rules: {
camelcase: ["error", { properties: "never" }],
"no-secrets/no-secrets": [
"error",
{
ignoreContent: ["userWithUnconfirmedEmail"],
},
],
"spellcheck/spell-checker": [
0,
{
comments: true,
strings: true,
identifiers: true,
templates: true,
lang: "en_US",
skipIfMatch: ["http://[^s]*", "^[-\\w]+/[-\\w\\.]+$"],
skipWordIfMatch: ["^vue.*$", "^pinia.*$"],
minLength: 3,
skipWords: [
"dict",
"aff",
"hunspellchecker",
"hunspell",
"utils",
"axios",
"vue",
"pinia",
"vuex",
"vuetify",
"vite",
"lang",
"gtag",
"csrf",
"href",
"pico",
"iframe",
"unmount",
"cvc",
"ecma",
"yoda",
"pageview",
"checkbox",
"vitest",
"rtl",
"ltr",
"keydown",
"roboto",
],
},
],
"no-unused-vars": "off", // or "@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
],
"no-unneeded-ternary": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-var": "error",
"sort-imports": [
"error",
{
ignoreDeclarationSort: true,
},
],
"spaced-comment": ["error", "always", { markers: ["/"] }],
yoda: "error",
"no-trailing-spaces": "error",
"dot-notation": "error",
"no-lonely-if": "error",
"no-undef-init": "error",
"prefer-const": "error",
},
};