-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
126 lines (125 loc) · 3.28 KB
/
eslint.config.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
import pluginJs from "@eslint/js";
import pluginIncutonez from "@incutonez/eslint-plugin";
import stylisticTs from "@stylistic/eslint-plugin-ts";
import pluginImport from "eslint-plugin-simple-import-sort";
import tailwind from "eslint-plugin-tailwindcss";
import pluginVue from "eslint-plugin-vue";
import globals from "globals";
import tseslint from "typescript-eslint";
export default [{
files: ["**/*.{js,mjs,cjs,ts,vue}"],
}, {
ignores: ["dist/*", "src/assets/theme/*"],
}, {
plugins: {
"typescript-eslint": tseslint.plugin,
"@stylistic/ts": stylisticTs,
},
languageOptions: {
globals: {
...globals.browser,
...globals.es2021,
},
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs["flat/strongly-recommended"],
...tailwind.configs["flat/recommended"], {
files: ["**/*.vue"],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
extraFileExtensions: [".vue"],
sourceType: "module",
},
},
}, {
plugins: {
"simple-import-sort": pluginImport,
"@incutonez": pluginIncutonez,
},
rules: {
"vue/html-indent": ["error", "tab"],
"vue/attributes-order": "error",
"tailwindcss/classnames-order": "error",
"quote-props": ["error", "as-needed"],
"padding-line-between-statements": ["error", {
blankLine: "always",
prev: "*",
next: "export",
}],
"space-before-function-paren": ["error", {
anonymous: "never",
named: "never",
asyncArrow: "always",
}],
"function-call-argument-newline": ["error", "never"],
"function-paren-newline": ["error", "never"],
"no-mixed-spaces-and-tabs": "off",
"no-var": "error",
"@typescript-eslint/no-unused-vars": "error",
"@stylistic/ts/indent": ["error", "tab", {
SwitchCase: 1,
ignoredNodes: ["PropertyDefinition"],
}],
"@typescript-eslint/ban-ts-comment": ["error", {
"ts-expect-error": "allow-with-description",
"ts-nocheck": "allow-with-description",
}],
semi: [2, "always"],
quotes: ["error", "double"],
curly: "error",
"multiline-ternary": ["error", "always-multiline"],
"brace-style": ["error", "stroustrup"],
"comma-dangle": ["error", "always-multiline"],
"eol-last": ["error", "always"],
"object-curly-newline": ["error", {
ObjectExpression: {
multiline: true,
minProperties: 1,
},
ObjectPattern: "never",
}],
"object-curly-spacing": ["error", "always"],
"object-property-newline": "error",
"no-trailing-spaces": ["error"],
"arrow-spacing": "error",
"no-duplicate-imports": "error",
"arrow-parens": "error",
"computed-property-spacing": ["error", "never"],
"func-call-spacing": ["error", "never"],
"new-parens": "error",
"prefer-const": "error",
"array-bracket-spacing": ["error", "never"],
"comma-spacing": ["error", {
before: false,
after: true,
}],
"@incutonez/array-element-newline": ["error", {
multiline: true,
minItems: 5,
bracesSameLine: true,
}],
"@incutonez/array-bracket-newline": ["error", {
multiline: true,
minItems: 5,
bracesSameLine: true,
}],
"key-spacing": "error",
"space-infix-ops": "error",
"no-multi-spaces": "error",
"space-before-blocks": "error",
"keyword-spacing": "error",
"space-in-parens": "error",
"simple-import-sort/imports": ["error", {
groups: [[
"^\\u0000",
"^vue",
"^@?\\w",
"^[^.]",
"^\\.",
]],
}],
},
}];