-
Notifications
You must be signed in to change notification settings - Fork 15
/
eslint.config.mjs
52 lines (51 loc) · 1.4 KB
/
eslint.config.mjs
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
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import solid from "eslint-plugin-solid/configs/recommended";
import * as tsParser from "@typescript-eslint/parser";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
export default [
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintPluginPrettierRecommended,
{
ignores: [
"dist/**",
"public/**",
"src/build-meta.ts",
"dev-dist/**",
"node_modules/**",
"vite.config.ts",
],
},
{
files: ["**/*.{ts,tsx}"],
...solid,
languageOptions: {
parser: tsParser,
parserOptions: {
project: "tsconfig.json",
},
},
rules: {
// The following two are for debug use. Should fix before release.
"@typescript-eslint/no-unused-vars": "warn",
"prefer-const": "warn",
// NDNts style class & namespace combination requires turning off the following
"@typescript-eslint/no-namespace": "off",
// Some cannot be fixed due to dependency issue
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"prettier/prettier": [
"error",
{
endOfLine: "auto",
singleQuote: true,
useTabs: false,
tabWidth: 2,
printWidth: 120,
semi: false,
},
],
},
},
];