-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
84 lines (84 loc) · 1.98 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
module.exports = {
env: {
browser: true,
node: true,
es6: true,
},
globals: {
__isDev__: "readonly",
PUBLIC_PATH: "readonly",
},
parser: "vue-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
ecmaVersion: 2020,
sourceType: "module",
jsxPragma: "React",
ecmaFeatures: {
jsx: true,
},
},
extends: [
// "standard",
"plugin:vue/vue3-recommended",
"plugin:prettier/recommended",
],
plugins: ["import", "vue", "@typescript-eslint", "prettier"],
rules: {
"prettier/prettier": "error",
"no-explicit-any": "off",
"ban-types": "off",
"no-unused-vars": "warn",
"no-debugger": "warn",
"prefer-promise-reject-errors": ["error", { allowEmptyReject: true }],
camelcase: ["error", { allow: ["^__", "Window"] }],
"prefer-promise-reject-errors": 0,
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/naming-convention": [
"error",
{
selector: "interface",
format: ["PascalCase"],
custom: {
regex: "^I[A-Z]",
match: true,
},
},
],
'import/first': 'warn',
'import/order': [
'warn',
{
groups: ['builtin', 'external', ['internal', 'parent', 'sibling', 'index']],
pathGroups: [
{
pattern: '@/**',
group: 'external',
position: 'after'
}
],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true
},
},
],
// vue
"vue/no-v-html": "off",
"vue/multi-word-component-names": "off",
"vue/one-component-per-file": "off",
},
overrides: [
{
files: ['*.d.ts'],
rules: {
'import/order': 'off',
},
},
]
};