-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathoxlintrc.json
More file actions
107 lines (107 loc) · 2.93 KB
/
oxlintrc.json
File metadata and controls
107 lines (107 loc) · 2.93 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
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": [
"typescript",
"unicorn",
"react",
"react-perf",
"oxc",
"import",
"jsdoc",
"node",
"promise",
"vitest"
],
"categories": {
"correctness": "error",
"perf": "error"
},
"rules": {
"no-console": "error",
"curly": ["error", "multi-line"],
"prefer-const": ["error", { "destructuring": "all" }],
"prefer-destructuring": [
"error",
{
"VariableDeclarator": { "array": false, "object": true }
}
],
"unicode-bom": ["error", "never"],
"typescript/consistent-indexed-object-style": ["error", "record"],
"typescript/ban-ts-comment": ["error", { "ts-expect-error": "allow-with-description" }],
"vitest/require-mock-type-parameters": "off",
"vitest/prefer-snapshot-hint": "off"
},
"overrides": [
{
"files": ["tasks/e2e/test/*.test.ts"],
"rules": {
"jest/valid-describe-callback": ["off"],
"jest/valid-title": ["off"],
"vitest/valid-title": ["off"]
}
},
{
// TODO: enable TS strict mode for these files and remove the override
"files": [
"napi/parser/test/**",
"napi/parser/test-browser/**",
"napi/parser/vitest.config.ts",
"napi/parser/vitest.config.browser.ts",
"tasks/e2e/**"
],
"rules": {
"typescript/no-useless-default-assignment": "off",
// TODO(camc314): there's some weird interaction between overrides
// and vitest/jest mappings happening here, these three lines shouldn't be necessary
"vitest/expect-expect": "error",
"vitest/no-standalone-expect": "error",
"vitest/no-conditional-expect": "error"
}
},
{
"files": ["apps/oxlint/test/fixtures/**"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": [
{
"regex": ".*/dist/.*",
"message": "Use `#oxlint` subpath imports instead of relative paths to `dist` directory"
}
]
}
]
}
}
],
"ignorePatterns": [
"**/fixtures/**",
"**/generated/**",
"npm/runtime/**",
"tasks/coverage/**",
"crates/oxc_semantic/tests/**",
"napi/minify/**", // TODO
"apps/oxlint/src-js/package/config.generated.ts",
"!apps/oxlint/test/fixtures/**",
"apps/oxlint/test/fixtures/**/files/**",
"apps/oxlint/conformance/submodules/**",
// Files generated by NAPI-RS
"*.d.ts",
"napi/*/*.wasi.cjs",
"napi/*/*.wasi-browser.js",
"napi/*/wasi-worker.mjs",
"napi/*/wasi-worker-browser.mjs",
"napi/*/src-js/*.wasi.cjs",
"napi/*/src-js/*.wasi-browser.js",
"napi/*/src-js/wasi-worker.mjs",
"napi/*/src-js/wasi-worker-browser.mjs",
"npm/oxlint-plugins/**",
"tasks/prettier_conformance/jsdoc/**"
],
"options": {
"typeAware": true,
"typeCheck": true
}
}