Repository navigation
Expand file tree
/
Copy pathoxlint.config.ts
More file actions
73 lines (72 loc) · 1.95 KB
/
Copy pathoxlint.config.ts
File metadata and controls
73 lines (72 loc) · 1.95 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
import { defineConfig } from "oxlint"
export default defineConfig({
plugins: ["typescript"],
categories: {
correctness: "error",
nursery: "off",
pedantic: "off",
perf: "warn",
restriction: "off",
style: "off",
suspicious: "warn",
},
options: {
reportUnusedDisableDirectives: "error",
typeAware: true,
},
overrides: [
{
files: ["packages/**/*.{ts,tsx,mts,cts}"],
rules: {
"typescript/ban-ts-comment": [
"error",
{
"ts-check": "allow-with-description",
"ts-expect-error": "allow-with-description",
"ts-ignore": "allow-with-description",
"ts-nocheck": true,
minimumDescriptionLength: 1,
},
],
"typescript/consistent-type-imports": [
"error",
{
fixStyle: "inline-type-imports",
prefer: "type-imports",
},
],
"typescript/explicit-module-boundary-types": "error",
"typescript/no-for-in-array": "error",
"typescript/no-misused-promises": [
"error",
{
checksVoidReturn: false,
},
],
"typescript/no-non-null-assertion": "warn",
"typescript/no-shadow": "error",
"typescript/no-unsafe-argument": "warn",
"typescript/no-unsafe-assignment": "warn",
"typescript/no-unsafe-call": "warn",
"typescript/no-unsafe-member-access": "warn",
"typescript/no-unsafe-return": "warn",
"typescript/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
},
],
"typescript/restrict-template-expressions": "warn",
"typescript/switch-exhaustiveness-check": [
"error",
{
considerDefaultExhaustiveForUnions: true,
},
],
eqeqeq: "error",
"no-console": "error",
"no-throw-literal": "error",
},
},
],
})