-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
69 lines (65 loc) · 1.93 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
const vueSettings = {
"no-unused-vars": "off",
"indent": "off",
"vue/html-indent": ["warn", 4],
"no-duplicate-imports": 2,
"unused-imports/no-unused-imports": "off",
"@typescript-eslint/no-unused-vars": "off",
"vue/valid-attribute-name": "off",
"vue/valid-model-definition": "off",
"vue/no-mutating-props": 1,
"vue/require-v-for-key": 1,
"vue/no-unused-components": 1,
"vue/multi-word-component-names": 1,
"vue/no-undef-components": 1,
"vue/no-unused-vars": 1,
"vue/no-multiple-template-root": "off",
};
const jsSettings = {
"no-unused-vars": 1,
"no-duplicate-imports": 2,
"unused-imports/no-unused-imports": 2,
"no-trailing-spaces": 1,
"indent": [1, 4],
};
module.exports = {
root: true,
extends: [
"plugin:@typescript-eslint/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: { "project": ["./tsconfig.json"] },
plugins: [
"unused-imports",
],
rules: jsSettings,
ignorePatterns: ["dist/**/*.*", "src/**/spec.js", "**/*.conf.js", ".eslintrc.js", "webpack.config.js", "run-calc.js"],
env: {
browser: true,
node: false,
},
overrides: [
{
files: ["src/web/**/*.js","src/web/**/*.ts"],
parser: "@typescript-eslint/parser",
parserOptions: { "project": ["./src/web/tsconfig.json"] },
},
{
files: ["src/web/**/*.vue"],
parser: "vue-eslint-parser",
parserOptions: {
"parser": {
"js": "espree",
"ts": "@typescript-eslint/parser",
"<template>": "espree",
},
"project": "./src/web/tsconfig-eslint.json"
},
extends: [
'plugin:vue/vue3-recommended',
"@vue/typescript/recommended"
],
rules: vueSettings,
}
]
};