Files
oxc-project__oxc/oxlintrc.json
leaysgur 0fa91283fd refactor(formatter,formatter_tests): move out prettier JS,TS,JSDoc conformance from tasks/ (#25477)
Migration from tasks/prettier_conformance to each crate test using oxc_formatter_tests, for JS/TS and JSDoc.
2026-08-12 00:48:32 +00:00

116 lines
3.1 KiB
JSON

{
"$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": {
"vitest/valid-describe-callback": ["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": ["tasks/e2e/nestjs/test/*.ts"],
"rules": {
"vitest/expect-expect": [
"error",
{ "assertFunctionNames": ["expect", "request.**.expect"] }
]
}
},
{
"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",
"*.d.cts",
"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/**"
],
"options": {
"typeAware": true,
"typeCheck": true
}
}