Replace ESLint with oxlint#10970
Conversation
@typespec/asset-emitter
@typespec/bundler
@typespec/compiler
@typespec/emitter-framework
@typespec/events
@typespec/html-program-viewer
@typespec/http
@typespec/http-canonicalization
@typespec/http-client
@typespec/http-client-js
@typespec/http-server-csharp
@typespec/http-server-js
@typespec/internal-build-utils
@typespec/json-schema
@typespec/library-linter
@typespec/mutator-framework
@typespec/openapi
@typespec/openapi3
@typespec/playground
@typespec/protobuf
@typespec/rest
@typespec/sse
@typespec/streams
tmlanguage-generator
@typespec/tspd
@typespec/versioning
@typespec/xml
commit: |
|
All changed packages have been documented.
Show changes
|
|
You can try these changes here
|
Summary
Migrate the entire monorepo linting from ESLint to oxlint (oxc-project).
Motivation
@typespec/eslint-pluginpackage and its build step in CI. One less package to maintain.eslint,typescript-eslint,@eslint/js,@vitest/eslint-plugin,eslint-plugin-react-hooks, andeslint-plugin-unicornfrom the dependency tree.Changes
Removed
eslint.config.js— the root ESLint flat configpackages/eslint-plugin-typespec/— the custom ESLint plugin (including thecall-decoratorrule)eslint,typescript-eslint,@eslint/js,@vitest/eslint-plugin,eslint-plugin-unicorn,eslint-plugin-react-hooks)Added
oxlint.config.ts— new root oxlint configuration covering:typescript-eslint/recommended).tsfiles).tsxfiles (excluding alloy-jsx emitter packages)oxlint(^1.69.0) as a root devDependencyTypeSpecCommonOxlintConfigsfor downstream repos (e.g., typespec-azure) to reuseUpdated
package.json:lint→oxlint . --deny-warnings,lint:fix→oxlint . --fixpackage.jsonlint scripts: same pattern.github/workflows/consistency.yml: removed the eslint plugin build step (oxlint needs no pre-build).vscode/extensions.json: recommend oxc extension instead of ESLint extensionRule Parity
The oxlint config replicates the effective ESLint rule set with these intentional differences:
typespec/call-decoratorrule has no oxlint equivalent and is dropped (low-signal rule)no-control-regexandno-unsafe-optional-chainingare explicitly disabled (intentional patterns in the codebase)