-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
58 lines (56 loc) · 2.04 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
// https://npmmirror.com/package/@typescript-eslint/eslint-plugin/v/5.0.1-alpha.14
module.exports = {
root: true,
parser: "vue-eslint-parser",
env: {
es6: true,
node: true,
},
// extends: ["plugin:vue/vue3-essential", "eslint:recommended", "@vue/typescript/recommended", "@vue/prettier", "@vue/prettier/@typescript-eslint"],
extends: [
// "plugin:vue/vue3-essential",
"plugin:vue/vue3-recommended",
"eslint:recommended",
"@vue/typescript/recommended",
// "plugin:@typescript-eslint/recommended",
// "plugin:prettier/recommended",
"@vue/prettier",
// "@vue/prettier/@typescript-eslint"
],
// plugins: ["@typescript-eslint"],
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
// parser: "@typescript-eslint/parser",
},
rules: {
// indent: [
// 'error',
// 2,
// {
// SwitchCase: 1,
// ignoredNodes: ['ConditionalExpression'], <-- I add this line
// },
// ],
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"@typescript-eslint/indent": ["error", 4, {"SwitchCase": 1, ignoredNodes: ["PropertyDefinition"] }],
"arrow-parens": "off",
semi: "error",
// "@vue-eslint/printWidth": ["error", 120],
"vue/v-bind-style": ["warn", "longform"], //autofix
"vue/prop-name-casing": ["error", "camelCase"], //autofix
"vue/multi-word-component-names": ["warn"],
// https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/attribute-hyphenation.md
"vue/attribute-hyphenation": [
"error",
"never",
{
ignore: [],
},
],
// 'prettier/prettier': ['error', { printWidth: 120 }],
// "prettier/prettier": "error",
"prettier/prettier": ["error", { singleQuote: false }],
},
};