-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
83 lines (83 loc) · 2.18 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
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
module.exports = {
root: true,
env: {
es2021: true,
node: true,
browser: false,
},
extends: [
"eslint:recommended",
/** @see https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#recommended-configs */
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:solid/typescript",
"@unocss",
"prettier",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 12,
sourceType: "module",
allowAutomaticSingleRunInference: true,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
extraFileExtensions: [".json"],
},
plugins: ["@typescript-eslint", "solid", "prettier"],
ignorePatterns: ["node_modules/**", "**/dist/**", "!**/.*", "pnpm-lock.yaml"],
rules: {
"prettier/prettier": [
"warn",
{
endOfLine: "auto",
},
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
disallowTypeAnnotations: false,
fixStyle: "separate-type-imports",
},
],
/**
* Having a semicolon helps the optimizer interpret your code correctly.
* This avoids rare errors in optimized code.
* @see https://twitter.com/alex_kozack/status/1364210394328408066
*/
semi: ["error", "always"],
/**
* This will make the history of changes in the hit a little cleaner
*/
"comma-dangle": ["warn", "only-multiline"],
/**
* Just for beauty
*/
quotes: [
"warn",
"double",
{
avoidEscape: true,
},
],
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: false,
},
],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/unbound-method": "off",
"solid/self-closing-comp": "off",
"solid/jsx-no-undef": "off",
},
};