-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
44 lines (44 loc) · 1.79 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
module.exports = {
root: true,
env: {
node: true
},
extends: ['plugin:vue/vue3-essential', '@vue/typescript/recommended', 'plugin:vue/recommended'],
plugins: ["vue", "simple-import-sort"],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".vue"]
}
}
},
parserOptions: {
ecmaVersion: 2020
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/multi-word-component-names': 'off',
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/naming-convention": ["error", {
"selector": "variable", "format": ["camelCase", "UPPER_CASE", "PascalCase"]
}],
"func-style": ["error", "declaration"],
"no-var": "error",
"prefer-const": "error",
"quotes": ["error", "single"],
"semi": ["error", "always"],
"complexity": ["error", {"max": 5}],
"no-with": "error",
"no-eval": "error",
"simple-import-sort/exports": "error",
"simple-import-sort/imports": ["error", {
"groups": [["^\\u0000"], ["^@?\\w"], ["^/"], ["/stores/"], ["/utils/"], ["/routes/"], ["/types/"], ["/layouts/"], ["/components/"], ["^\\.\\.(?!/?$)", "^\\.\\./?$"], ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"], ["^.+\\.s?css$"],]
}],
"camelcase": ["error", {"properties": "never"}],
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"vue/no-unused-components": ["error", { "ignoreWhenBindingPresent": true }],
"vue/no-unused-vars": ["error", { "ignorePattern": "^_" }],
"vue/no-v-html": ["error"],
}
}