-
Notifications
You must be signed in to change notification settings - Fork 963
Expand file tree
/
Copy path.oxlintrc.json
More file actions
64 lines (60 loc) · 2.26 KB
/
.oxlintrc.json
File metadata and controls
64 lines (60 loc) · 2.26 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
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
// Migrated from eslint.config.mjs (ESLint v10 flat config).
// Note: oxlint and oxfmt require Node >= 20. The repo's engines field
// (>=22.12.0) already exceeds that floor. CI runs lint/format on Node 22.
//
// Unmappable rules (not available in oxlint):
// - import/no-extraneous-dependencies: validates imports are declared in
// package.json. "lerna run deps" provides partial coverage.
// - valid-expect-in-promise: no oxlint equivalent exists.
//
// The old config spread @vitest/eslint-plugin's recommended rules (16 rules
// like expect-expect, no-focused-tests, no-identical-title, valid-expect,
// etc.). In oxlint these live under the "jest" plugin, but enabling it
// causes an irreconcilable conflict with vitest/max-nested-describe.
// Revisit when oxlint resolves the jest/vitest plugin interaction.
"ignorePatterns": ["**/lib/", "**/coverage/", "**/node_modules/", "**/fixtures/", "**/dist/"],
"env": {
"node": true
},
"plugins": ["typescript", "import", "vitest"],
"rules": {
"import/default": "off",
"import/first": "error",
"import/no-absolute-path": "error",
"import/no-amd": "error",
"import/no-mutable-exports": "error",
"import/no-named-default": "error",
"import/no-self-import": "error",
"typescript/no-unused-vars": "off",
"typescript/no-use-before-define": "off",
"typescript/no-explicit-any": "off",
"typescript/explicit-function-return-type": "off",
"typescript/no-var-requires": "off",
"typescript/no-inferrable-types": "off",
"typescript/no-non-null-assertion": "off",
"typescript/triple-slash-reference": "off",
"vitest/hoisted-apis-on-top": "off",
"vitest/max-nested-describe": ["error", { "max": 3 }],
"vitest/require-mock-type-parameters": "off",
"vitest/require-to-throw-message": "error"
},
"overrides": [
{
// Match the old ESLint config which only disabled these for TS files
"files": ["**/*.ts", "**/*.cts"],
"rules": {
"no-empty": "off",
"no-var": "off"
}
},
{
"files": ["**/*.test.ts", "**/*.test.js"],
"rules": {
"import/first": "off",
"vitest/no-import-node-test": "error"
}
}
]
}