-
Notifications
You must be signed in to change notification settings - Fork 965
chore: replace eslint with oxlint #4678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
escapedcat
wants to merge
5
commits into
master
Choose a base branch
from
chore/replace-eslint-with-oxlint
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7937470
chore: replace eslint with oxlint
escapedcat 9b65ed3
fix: scope no-empty/no-var to TS files, document unmappable rules
escapedcat 7959bd2
chore: replace prettier with oxfmt
escapedcat 0580c95
chore: rename prettierignore, document Node requirement, update edito…
escapedcat dc4e2cd
fix: avoid overlapping lint-staged globs for ts/js files
escapedcat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| { | ||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||
|
|
||
| // Migrated from eslint.config.mjs (ESLint v10 flat config). | ||
| // Note: oxlint and oxfmt require Node >= 20. The repo's engines field | ||
| // (>=v18) applies to the published packages. CI runs lint/format on | ||
| // Node 22 (lts/*). Local development requires Node >= 20 for linting. | ||
| // | ||
| // Unmappable rules (not available in oxlint): | ||
| // - import/no-extraneous-dependencies: validates imports are declared in | ||
| // package.json. "lerna run deps" provides partial coverage. | ||
| // - valid-expect-in-promise: no oxlint equivalent exists. | ||
| // | ||
| // The old config spread @vitest/eslint-plugin's recommended rules (16 rules | ||
| // like expect-expect, no-focused-tests, no-identical-title, valid-expect, | ||
| // etc.). In oxlint these live under the "jest" plugin, but enabling it | ||
| // causes an irreconcilable conflict with vitest/max-nested-describe. | ||
| // Revisit when oxlint resolves the jest/vitest plugin interaction. | ||
|
|
||
| "ignorePatterns": ["**/lib/", "**/coverage/", "**/node_modules/", "**/fixtures/", "**/dist/"], | ||
| "env": { | ||
| "node": true | ||
| }, | ||
| "plugins": ["typescript", "import", "vitest"], | ||
| "rules": { | ||
| "import/default": "off", | ||
| "import/first": "error", | ||
| "import/no-absolute-path": "error", | ||
| "import/no-amd": "error", | ||
| "import/no-mutable-exports": "error", | ||
| "import/no-named-default": "error", | ||
| "import/no-self-import": "error", | ||
|
|
||
|
escapedcat marked this conversation as resolved.
|
||
| "typescript/no-unused-vars": "off", | ||
| "typescript/no-use-before-define": "off", | ||
| "typescript/no-explicit-any": "off", | ||
| "typescript/explicit-function-return-type": "off", | ||
| "typescript/no-var-requires": "off", | ||
| "typescript/no-inferrable-types": "off", | ||
| "typescript/no-non-null-assertion": "off", | ||
| "typescript/triple-slash-reference": "off", | ||
|
|
||
| "vitest/hoisted-apis-on-top": "off", | ||
| "vitest/max-nested-describe": ["error", { "max": 3 }], | ||
| "vitest/require-mock-type-parameters": "off" | ||
| }, | ||
| "overrides": [ | ||
|
escapedcat marked this conversation as resolved.
|
||
| { | ||
| // Match the old ESLint config which only disabled these for TS files | ||
| "files": ["**/*.ts", "**/*.cts"], | ||
| "rules": { | ||
| "no-empty": "off", | ||
| "no-var": "off" | ||
| } | ||
| }, | ||
| { | ||
| "files": ["**/*.test.ts", "**/*.test.js"], | ||
| "rules": { | ||
| "import/first": "off", | ||
| "vitest/no-import-node-test": "error" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,40 @@ | ||
| { | ||
| "name": "commitlint-config-angular", | ||
| "type": "module", | ||
| "version": "20.5.0", | ||
| "gitHead": "e82f05a737626bb69979d14564f5ff601997f679", | ||
| "description": "Shareable commitlint config enforcing the angular commit convention", | ||
| "files": [ | ||
| "index.js" | ||
| "keywords": [ | ||
| "angular", | ||
| "commitlint", | ||
| "commitlint-config", | ||
| "conventional-changelog" | ||
| ], | ||
| "scripts": { | ||
| "deps": "dep-check", | ||
| "pkg": "pkg-check" | ||
| "homepage": "https://commitlint.js.org/", | ||
| "bugs": { | ||
| "url": "https://github.com/conventional-changelog/commitlint/issues" | ||
| }, | ||
| "license": "MIT", | ||
| "author": "Mario Nebl <hello@herebecode.com>", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/conventional-changelog/commitlint.git", | ||
| "directory": "@alias/commitlint-config-angular" | ||
| }, | ||
| "keywords": [ | ||
| "conventional-changelog", | ||
| "commitlint", | ||
| "commitlint-config", | ||
| "angular" | ||
| "files": [ | ||
| "index.js" | ||
| ], | ||
| "author": "Mario Nebl <hello@herebecode.com>", | ||
| "license": "MIT", | ||
| "bugs": { | ||
| "url": "https://github.com/conventional-changelog/commitlint/issues" | ||
| }, | ||
| "homepage": "https://commitlint.js.org/", | ||
| "engines": { | ||
| "node": ">=v18" | ||
| "type": "module", | ||
| "scripts": { | ||
| "deps": "dep-check", | ||
| "pkg": "pkg-check" | ||
| }, | ||
| "dependencies": { | ||
| "@commitlint/config-angular": "^20.5.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@commitlint/utils": "^20.0.0" | ||
| }, | ||
| "gitHead": "e82f05a737626bb69979d14564f5ff601997f679" | ||
| "engines": { | ||
| "node": ">=v18" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,40 @@ | ||
| { | ||
| "name": "commitlint-config-lerna-scopes", | ||
| "type": "module", | ||
| "version": "20.4.3", | ||
| "gitHead": "e82f05a737626bb69979d14564f5ff601997f679", | ||
| "description": "Shareable commitlint config enforcing lerna package names as scopes", | ||
| "files": [ | ||
| "index.js" | ||
| "keywords": [ | ||
| "angular", | ||
| "commitlint", | ||
| "commitlint-config", | ||
| "conventional-changelog" | ||
| ], | ||
| "scripts": { | ||
| "deps": "dep-check", | ||
| "pkg": "pkg-check" | ||
| "homepage": "https://commitlint.js.org/", | ||
| "bugs": { | ||
| "url": "https://github.com/conventional-changelog/commitlint/issues" | ||
| }, | ||
| "license": "MIT", | ||
| "author": "Mario Nebl <hello@herebecode.com>", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/conventional-changelog/commitlint.git", | ||
| "directory": "@alias/commitlint-config-lerna-scopes" | ||
| }, | ||
| "keywords": [ | ||
| "conventional-changelog", | ||
| "commitlint", | ||
| "commitlint-config", | ||
| "angular" | ||
| "files": [ | ||
| "index.js" | ||
| ], | ||
| "author": "Mario Nebl <hello@herebecode.com>", | ||
| "license": "MIT", | ||
| "bugs": { | ||
| "url": "https://github.com/conventional-changelog/commitlint/issues" | ||
| }, | ||
| "homepage": "https://commitlint.js.org/", | ||
| "engines": { | ||
| "node": ">=v18" | ||
| "type": "module", | ||
| "scripts": { | ||
| "deps": "dep-check", | ||
| "pkg": "pkg-check" | ||
| }, | ||
| "dependencies": { | ||
| "@commitlint/config-lerna-scopes": "^20.4.3" | ||
| }, | ||
| "devDependencies": { | ||
| "@commitlint/utils": "^20.0.0" | ||
| }, | ||
| "gitHead": "e82f05a737626bb69979d14564f5ff601997f679" | ||
| "engines": { | ||
| "node": ">=v18" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,40 @@ | ||
| { | ||
| "name": "commitlint-config-nx-scopes", | ||
| "type": "module", | ||
| "version": "20.5.0", | ||
| "gitHead": "e82f05a737626bb69979d14564f5ff601997f679", | ||
| "description": "Shareable commitlint config enforcing nx project names as scopes", | ||
| "files": [ | ||
| "index.js" | ||
| ], | ||
| "scripts": { | ||
| "deps": "dep-check", | ||
| "pkg": "pkg-check" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/conventional-changelog/commitlint.git", | ||
| "directory": "@alias/commitlint-config-nx-scopes" | ||
| }, | ||
| "keywords": [ | ||
| "conventional-changelog", | ||
| "commitlint", | ||
| "commitlint-config", | ||
| "conventional-changelog", | ||
| "nx" | ||
| ], | ||
| "author": "Florian Guitton <florian@secretarium.com>", | ||
| "license": "MIT", | ||
| "homepage": "https://commitlint.js.org/", | ||
| "bugs": { | ||
| "url": "https://github.com/conventional-changelog/commitlint/issues" | ||
| }, | ||
| "homepage": "https://commitlint.js.org/", | ||
| "engines": { | ||
| "node": ">=v18" | ||
| "license": "MIT", | ||
| "author": "Florian Guitton <florian@secretarium.com>", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/conventional-changelog/commitlint.git", | ||
| "directory": "@alias/commitlint-config-nx-scopes" | ||
| }, | ||
| "files": [ | ||
| "index.js" | ||
| ], | ||
| "type": "module", | ||
| "scripts": { | ||
| "deps": "dep-check", | ||
| "pkg": "pkg-check" | ||
| }, | ||
| "dependencies": { | ||
| "@commitlint/config-nx-scopes": "^20.5.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@commitlint/utils": "^20.0.0" | ||
| }, | ||
| "gitHead": "e82f05a737626bb69979d14564f5ff601997f679" | ||
| "engines": { | ||
| "node": ">=v18" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,40 @@ | ||
| { | ||
| "name": "commitlint-config-patternplate", | ||
| "type": "module", | ||
| "version": "20.5.0", | ||
| "gitHead": "e82f05a737626bb69979d14564f5ff601997f679", | ||
| "description": "Lint your commits, patternplate-style", | ||
| "files": [ | ||
| "index.js" | ||
| "keywords": [ | ||
| "angular", | ||
| "commitlint", | ||
| "commitlint-config", | ||
| "conventional-changelog" | ||
| ], | ||
| "scripts": { | ||
| "deps": "dep-check", | ||
| "pkg": "pkg-check" | ||
| "homepage": "https://commitlint.js.org/", | ||
| "bugs": { | ||
| "url": "https://github.com/conventional-changelog/commitlint/issues" | ||
| }, | ||
| "license": "MIT", | ||
| "author": "Mario Nebl <hello@herebecode.com>", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/conventional-changelog/commitlint.git", | ||
| "directory": "@alias/commitlint-config-patternplate" | ||
| }, | ||
| "keywords": [ | ||
| "conventional-changelog", | ||
| "commitlint", | ||
| "commitlint-config", | ||
| "angular" | ||
| "files": [ | ||
| "index.js" | ||
| ], | ||
| "author": "Mario Nebl <hello@herebecode.com>", | ||
| "license": "MIT", | ||
| "bugs": { | ||
| "url": "https://github.com/conventional-changelog/commitlint/issues" | ||
| }, | ||
| "homepage": "https://commitlint.js.org/", | ||
| "engines": { | ||
| "node": ">=v18" | ||
| "type": "module", | ||
| "scripts": { | ||
| "deps": "dep-check", | ||
| "pkg": "pkg-check" | ||
| }, | ||
| "dependencies": { | ||
| "@commitlint/config-patternplate": "^20.5.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@commitlint/utils": "^20.0.0" | ||
| }, | ||
| "gitHead": "e82f05a737626bb69979d14564f5ff601997f679" | ||
| "engines": { | ||
| "node": ">=v18" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| 'use strict'; | ||
| "use strict"; | ||
|
|
||
| const path = require('node:path'); | ||
| const path = require("node:path"); | ||
|
|
||
| module.exports = path.join(__dirname, 'cli.js'); | ||
| module.exports = path.join(__dirname, "cli.js"); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.