-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathoxlint.config.mts
More file actions
126 lines (122 loc) · 2.55 KB
/
oxlint.config.mts
File metadata and controls
126 lines (122 loc) · 2.55 KB
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 { defineConfig } from "oxlint";
const disabledRules = [
"eslint/arrow-body-style",
"eslint/capitalized-comments",
"eslint/id-length",
"eslint/init-declarations",
"eslint/no-console",
"eslint/no-continue",
"eslint/no-eq-null",
"eslint/no-magic-numbers",
"eslint/no-negated-condition",
"eslint/no-plusplus",
"eslint/no-ternary",
"eslint/no-undefined",
"eslint/no-use-before-define",
"eslint/no-void",
"eslint/sort-imports",
"eslint/sort-keys",
"func-style",
"import/exports-last",
"import/group-exports",
"import/max-dependencies",
"import/no-named-export",
"import/no-namespace",
"import/no-nodejs-modules",
"import/prefer-default-export",
"oxc/no-async-await",
"oxc/no-optional-chaining",
"oxc/no-rest-spread-properties",
"promise/prefer-await-to-callbacks",
"typescript/prefer-readonly-parameter-types",
"typescript/promise-function-async",
"unicorn/filename-case",
"unicorn/no-lonely-if",
"unicorn/no-null",
"unicorn/prefer-at",
"unicorn/switch-case-braces",
];
// oxlint-disable-next-line import/no-default-export
export default defineConfig({
options: {
typeAware: true,
typeCheck: true,
},
env: {
node: true,
mocha: true,
},
plugins: [
"eslint",
"typescript",
"unicorn",
"oxc",
"import",
"node",
"promise",
],
categories: {
correctness: "warn",
suspicious: "warn",
pedantic: "warn",
perf: "warn",
style: "warn",
restriction: "warn",
nursery: "warn",
},
rules: {
...Object.fromEntries(disabledRules.map((r) => [r, "off"])),
"eslint/no-duplicate-imports": [
"warn",
{
allowSeparateTypeImports: true,
},
],
"eslint/no-restricted-imports": [
"warn",
{
paths: [
{
name: "node:assert",
message: "Use node:assert/strict instead",
},
],
},
],
"eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
},
],
"typescript/no-confusing-void-expression": [
"warn",
{
ignoreArrowShorthand: true,
},
],
"typescript/strict-boolean-expressions": [
"warn",
{
allowNullableBoolean: true,
},
],
eqeqeq: [
"warn",
"always",
{
null: "never",
},
],
},
overrides: [
{
files: ["src/test/**/*.ts"],
rules: {
"unicorn/prefer-module": "off",
"unicorn/prefer-top-level-await": "off",
},
},
],
});