forked from beercss/beercss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
56 lines (56 loc) · 1.57 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
module.exports = {
root: true,
parser: "vue-eslint-parser",
parserOptions: {
extraFileExtensions: [".vue"],
parser: "@typescript-eslint/parser",
project: ["./tsconfig.eslint.json"],
},
extends: [
"standard-with-typescript",
"eslint:recommended",
"plugin:vue/strongly-recommended",
"plugin:vue/vue3-recommended",
],
rules: {
// double quotes
quotes: ["error", "double"],
"@typescript-eslint/quotes": ["error", "double"],
// semicolon
semi: ["error", "always"],
"@typescript-eslint/semi": ["error", "always"],
// trailing comma
"comma-dangle": ["error", "always-multiline"],
"@typescript-eslint/comma-dangle": ["error", "always-multiline"],
"@typescript-eslint/member-delimiter-style": ["error", {
multiline: {
delimiter: "comma",
requireLast: true,
},
singleline: {
delimiter: "comma",
requireLast: false,
},
}],
// Array<T>
"@typescript-eslint/array-type": ["error", { default: "generic" }],
// allow unused variables
"no-unused-vars": "warn",
// allow functions without return type
"@typescript-eslint/explicit-function-return-type": 0,
// allow non-strict boolean expressions
"@typescript-eslint/strict-boolean-expressions": 0,
// single word vue files
"vue/multi-word-component-names": 0,
// allow position as key in v-for
"vue/require-v-for-key": 0,
// 2-space indentation
indent: ["error", 2],
},
overrides: [
{
files: [".eslintrc.cjs"],
parserOptions: { project: null },
},
],
};