-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
eslint.config.js
121 lines (118 loc) · 2.75 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
// @ts-check
import eslint from "@eslint/js";
import prettier from "eslint-plugin-prettier/recommended";
// @ts-ignore
import react from "eslint-plugin-react";
// See https://github.com/solidjs-community/eslint-plugin-solid/issues/118
// import solid from "eslint-plugin-solid/configs/typescript";
import solid from "eslint-plugin-solid/dist/configs/typescript.js";
// @ts-ignore
import pluginVue from "eslint-plugin-vue";
import globals from "globals";
import tseslint from "typescript-eslint";
import vueParser from "vue-eslint-parser";
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.config({
rules: {},
}),
{
ignores: ["**/*.cjs", "**/dist/*", "**/node_modules/*"],
},
{
languageOptions: {
parserOptions: {
sourceType: "module",
ecmaVersion: 2021,
},
},
},
{
files: ["**/*.vue"],
languageOptions: {
parser: vueParser,
parserOptions: {
parser: tseslint.parser,
sourceType: "module",
ecmaVersion: 2021,
},
globals: {
BATI: false,
},
},
},
{
rules: {
"no-unused-labels": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/ban-types": 0,
"@typescript-eslint/consistent-type-imports": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-empty-interface": 0,
"@typescript-eslint/no-namespace": 0,
"@typescript-eslint/no-unused-vars": [
1,
{
argsIgnorePattern: "^_",
},
],
},
},
{
files: ["**/*.spec.ts"],
rules: {
"@typescript-eslint/no-explicit-any": 0,
},
},
{
// React
plugins: {
react,
},
files: ["boilerplates/react/**/*", "boilerplates/react-*/**/*"],
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
globals: {
...globals.browser,
},
},
},
settings: {
react: {
version: "detect",
},
},
},
{
// SolidJS
...solid,
files: ["boilerplates/solid/**/*", "boilerplates/solid-*/**/*"],
rules: {
"solid/components-return-once": 0,
},
},
...pluginVue.configs["flat/recommended"],
{
rules: {
"vue/multi-word-component-names": 0,
"vue/singleline-html-element-content-newline": 0,
"vue/max-attributes-per-line": 0,
"vue/html-self-closing": 0,
},
},
// {
// // VueJS
// extends: ["plugin:vue/vue3-recommended"],
// files: ["boilerplates/vue/**/*.vue", "boilerplates/vue-*/**/*.vue"],
// parserOptions: {
// parser: "@typescript-eslint/parser",
// sourceType: "module",
// ecmaVersion: 2021,
// },
// },
prettier,
);