Skip to content

Replace ESLint with oxlint#10970

Draft
timotheeguerin wants to merge 3 commits into
microsoft:mainfrom
timotheeguerin:oxc-lint
Draft

Replace ESLint with oxlint#10970
timotheeguerin wants to merge 3 commits into
microsoft:mainfrom
timotheeguerin:oxc-lint

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Summary

Migrate the entire monorepo linting from ESLint to oxlint (oxc-project).

Motivation

  • Performance: oxlint is written in Rust and is orders of magnitude faster than ESLint, eliminating the need to build the eslint plugin before linting and drastically reducing CI lint times.
  • Simplicity: Removes the need for a custom @typespec/eslint-plugin package and its build step in CI. One less package to maintain.
  • Fewer dependencies: Drops eslint, typescript-eslint, @eslint/js, @vitest/eslint-plugin, eslint-plugin-react-hooks, and eslint-plugin-unicorn from the dependency tree.

Changes

Removed

  • eslint.config.js — the root ESLint flat config
  • packages/eslint-plugin-typespec/ — the custom ESLint plugin (including the call-decorator rule)
  • All ESLint-related devDependencies (eslint, typescript-eslint, @eslint/js, @vitest/eslint-plugin, eslint-plugin-unicorn, eslint-plugin-react-hooks)
  • CI step that built the eslint plugin before linting

Added

  • oxlint.config.ts — new root oxlint configuration covering:
    • Core correctness rules
    • TypeScript-specific rules (mirrors typescript-eslint/recommended)
    • Unicorn filename-case enforcement (kebab-case for .ts files)
    • React hooks rules for .tsx files (excluding alloy-jsx emitter packages)
    • Vitest rules for test files
  • oxlint (^1.69.0) as a root devDependency
  • Exported TypeSpecCommonOxlintConfigs for downstream repos (e.g., typespec-azure) to reuse

Updated

  • Root package.json: lintoxlint . --deny-warnings, lint:fixoxlint . --fix
  • All per-package package.json lint 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 extension
  • Minor code fixes for issues oxlint caught that ESLint did not

Rule Parity

The oxlint config replicates the effective ESLint rule set with these intentional differences:

  • The custom typespec/call-decorator rule has no oxlint equivalent and is dropped (low-signal rule)
  • no-control-regex and no-unsafe-optional-chaining are explicitly disabled (intentional patterns in the codebase)

@microsoft-github-policy-service microsoft-github-policy-service Bot added compiler:core Issues for @typespec/compiler emitter-framework Issues for the emitter framework lib:http lib:openapi lib:rest lib:versioning tspd Issues for the tspd tool emitter:client:js Issue for the JS client emitter: @typespec/http-client-js emitter:json-schema emitter:protobuf The protobuf emitter emitter:openapi3 Issues for @typespec/openapi3 emitter eng ui:playground ui:type-graph-viewer labels Jun 11, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

@typespec/asset-emitter

npm i https://pkg.pr.new/microsoft/typespec/@typespec/asset-emitter@10970

@typespec/bundler

npm i https://pkg.pr.new/microsoft/typespec/@typespec/bundler@10970

@typespec/compiler

npm i https://pkg.pr.new/microsoft/typespec/@typespec/compiler@10970

@typespec/emitter-framework

npm i https://pkg.pr.new/microsoft/typespec/@typespec/emitter-framework@10970

@typespec/events

npm i https://pkg.pr.new/microsoft/typespec/@typespec/events@10970

@typespec/html-program-viewer

npm i https://pkg.pr.new/microsoft/typespec/@typespec/html-program-viewer@10970

@typespec/http

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http@10970

@typespec/http-canonicalization

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http-canonicalization@10970

@typespec/http-client

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http-client@10970

@typespec/http-client-js

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http-client-js@10970

@typespec/http-server-csharp

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http-server-csharp@10970

@typespec/http-server-js

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http-server-js@10970

@typespec/internal-build-utils

npm i https://pkg.pr.new/microsoft/typespec/@typespec/internal-build-utils@10970

@typespec/json-schema

npm i https://pkg.pr.new/microsoft/typespec/@typespec/json-schema@10970

@typespec/library-linter

npm i https://pkg.pr.new/microsoft/typespec/@typespec/library-linter@10970

@typespec/mutator-framework

npm i https://pkg.pr.new/microsoft/typespec/@typespec/mutator-framework@10970

@typespec/openapi

npm i https://pkg.pr.new/microsoft/typespec/@typespec/openapi@10970

@typespec/openapi3

npm i https://pkg.pr.new/microsoft/typespec/@typespec/openapi3@10970

@typespec/playground

npm i https://pkg.pr.new/microsoft/typespec/@typespec/playground@10970

@typespec/protobuf

npm i https://pkg.pr.new/microsoft/typespec/@typespec/protobuf@10970

@typespec/rest

npm i https://pkg.pr.new/microsoft/typespec/@typespec/rest@10970

@typespec/sse

npm i https://pkg.pr.new/microsoft/typespec/@typespec/sse@10970

@typespec/streams

npm i https://pkg.pr.new/microsoft/typespec/@typespec/streams@10970

tmlanguage-generator

npm i https://pkg.pr.new/microsoft/typespec/tmlanguage-generator@10970

@typespec/tspd

npm i https://pkg.pr.new/microsoft/typespec/@typespec/tspd@10970

@typespec/versioning

npm i https://pkg.pr.new/microsoft/typespec/@typespec/versioning@10970

@typespec/xml

npm i https://pkg.pr.new/microsoft/typespec/@typespec/xml@10970

commit: e1064a5

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/asset-emitter
  • @typespec/bundler
  • @typespec/compiler
  • @typespec/emitter-framework
  • @typespec/events
  • @typespec/html-program-viewer
  • @typespec/http-canonicalization
  • @typespec/http-client-js
  • @typespec/http-client
  • @typespec/http-server-csharp
  • @typespec/http-server-js
  • @typespec/http
  • @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
Show changes

@typespec/asset-emitter - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/bundler - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/compiler - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/emitter-framework - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/events - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/html-program-viewer - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/http-canonicalization - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/http-client-js - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/http-client - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/http-server-csharp - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/http-server-js - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/http - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/internal-build-utils - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/json-schema - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/library-linter - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/mutator-framework - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/openapi - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/openapi3 - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/playground - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/protobuf - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/rest - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/sse - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/streams - internal ✏️

Migrate linting from ESLint to oxlint.

tmlanguage-generator - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/tspd - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/versioning - internal ✏️

Migrate linting from ESLint to oxlint.

@typespec/xml - internal ✏️

Migrate linting from ESLint to oxlint.

@azure-sdk-automation

azure-sdk-automation Bot commented Jun 11, 2026

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler emitter:client:js Issue for the JS client emitter: @typespec/http-client-js emitter:json-schema emitter:openapi3 Issues for @typespec/openapi3 emitter emitter:protobuf The protobuf emitter emitter-framework Issues for the emitter framework eng lib:http lib:openapi lib:rest lib:versioning tspd Issues for the tspd tool ui:playground ui:type-graph-viewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant