♻️ refactor(vscode): migrate linter from ESLint to oxlint#1263
Conversation
Replace ESLint and @typescript-eslint plugins with oxlint for faster linting in the VSCode extension. Equivalent lint rules are preserved in the new .oxlintrc.json configuration.
There was a problem hiding this comment.
Pull request overview
Refactors the VS Code extension’s linting setup by replacing ESLint + typescript-eslint with oxlint.
Changes:
- Switched the
lintnpm script to runoxlintinstead ofeslint. - Removed ESLint configuration and dependencies.
- Added an
.oxlintrc.jsonconfiguration for TypeScript linting.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| editors/vscode/package.json | Replaces the lint script and devDependencies to use oxlint. |
| editors/vscode/eslint.config.mjs | Removes the previous ESLint flat config. |
| editors/vscode/.oxlintrc.json | Adds oxlint configuration, including TypeScript plugin and rule overrides. |
Files not reviewed (1)
- editors/vscode/package-lock.json: Language not supported
| @@ -0,0 +1,29 @@ | |||
| { | |||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | |||
| "plugins": ["typescript"], | |||
There was a problem hiding this comment.
The config declares the typescript plugin, but several rules are referenced with the @typescript-eslint/ prefix. With this mismatch, these rules are likely not recognized/applied by oxlint (or may cause config validation errors). Update the rule IDs to the correct oxlint TypeScript rule namespace (per the oxlint schema/docs), or adjust the plugins list to match the rule prefixes you intend to use.
| "@typescript-eslint/no-explicit-any": "error", | ||
| "@typescript-eslint/no-require-imports": "error", | ||
| "@typescript-eslint/no-this-alias": "error", | ||
| "@typescript-eslint/no-unnecessary-type-constraint": "error", |
There was a problem hiding this comment.
The config declares the typescript plugin, but several rules are referenced with the @typescript-eslint/ prefix. With this mismatch, these rules are likely not recognized/applied by oxlint (or may cause config validation errors). Update the rule IDs to the correct oxlint TypeScript rule namespace (per the oxlint schema/docs), or adjust the plugins list to match the rule prefixes you intend to use.
| "@typescript-eslint/no-explicit-any": "error", | |
| "@typescript-eslint/no-require-imports": "error", | |
| "@typescript-eslint/no-this-alias": "error", | |
| "@typescript-eslint/no-unnecessary-type-constraint": "error", | |
| "typescript/no-explicit-any": "error", | |
| "typescript/no-require-imports": "error", | |
| "typescript/no-this-alias": "error", | |
| "typescript/no-unnecessary-type-constraint": "error", |
No description provided.