-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
67 lines (61 loc) · 1.73 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
module.exports = {
env: {
node: true,
browser: true,
es2021: true,
},
extends: [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:vue/base",
"plugin:vue/vue3-recommended",
"plugin:@typescript-eslint/recommended",
"prettier", // https://prettier.io/docs/en/integrating-with-linters.html
],
plugins: ["@typescript-eslint", "import"],
rules: {
"no-console":
process.env.NODE_ENV === "production"
? ["warn", { allow: ["warn", "error", "debug"] }]
: "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"vue/no-v-html": "off",
"vue/require-default-prop": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
semi: ["warn", "never"],
"sort-imports": [
"error",
{
ignoreCase: false,
ignoreDeclarationSort: true, // don"t want to sort import lines, use eslint-plugin-import instead
ignoreMemberSort: false,
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
allowSeparatedGroups: true,
},
],
},
root: true,
// https://www.npmjs.com/package/vue-eslint-parser
parser: "vue-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
// project: "tsconfig.json",
sourceType: "module",
ecmaVersion: 2020,
ecmaFeatures: {
globalReturn: false,
impliedStrict: false,
jsx: false,
},
},
settings: {
"import/resolver": {
//# You will also need to install and configure the TypeScript resolver
//# See also https://github.com/import-js/eslint-import-resolver-typescript#configuration
typescript: true,
node: true,
},
},
}