Files
oxc/oxlintrc.json
Boshen f585cb42cd feat(napi): add threadless WASI builds (#26898)
## Summary

- add threadless `wasm32-wasip1` builds and generated loaders for parser, minify, transform, transform-react, and transform-relay
- use the threadless bindings for browser and Cloudflare Workers while preserving threaded WASI and WebContainer fallbacks
- build and publish the new target in CI and release workflows

Closes #25271

## Testing

- native NAPI builds and package tests: 1,091 passed
- parser Chromium browser tests passed
- local workerd smoke tests passed for all five packages
- deployed Workers using local package tarballs passed for all five packages and reported `wasm32-wasip1`
- packed main-package file lists match the published `0.150.0` packages
- `just fmt`, `just check`, `just lint`, `just doc`, `just ast`, targeted Oxlint, typos, and `git diff --check` passed
- `just ready` reaches three unrelated Oxlint ANSI-color snapshot mismatches in this non-interactive environment; no pending snapshots remain

## AI assistance

Codex was used to help implement and test this change. The contributor remains responsible for reviewing and understanding the changes before merge.
2026-09-23 06:54:41 +00:00

124 lines
3.3 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": ["packages/codegen/**"],
"rules": {
"typescript/no-deprecated": "error"
}
},
{
"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/*/*.wasip1*",
"napi/*/wasi-worker.mjs",
"napi/*/wasi-worker-browser.mjs",
"napi/*/src-js/*.wasi.cjs",
"napi/*/src-js/*.wasi-browser.js",
"napi/*/src-js/*.wasip1*",
"napi/*/src-js/wasi-worker.mjs",
"napi/*/src-js/wasi-worker-browser.mjs",
"npm/oxlint-plugins/**"
],
"options": {
"typeAware": true,
"typeCheck": true
}
}