Repository navigation
chore: replace ESLint with oxlint #283
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
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,157 @@ | ||
| { | ||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||
| "plugins": [], | ||
| "categories": { | ||
| "correctness": "off" | ||
| }, | ||
| "env": { | ||
| "builtin": true | ||
| }, | ||
| "rules": { | ||
| "constructor-super": "error", | ||
| "for-direction": "error", | ||
| "getter-return": "error", | ||
| "no-async-promise-executor": "error", | ||
| "no-case-declarations": "error", | ||
| "no-class-assign": "error", | ||
| "no-compare-neg-zero": "error", | ||
| "no-cond-assign": "error", | ||
| "no-const-assign": "error", | ||
| "no-constant-binary-expression": "error", | ||
| "no-constant-condition": "error", | ||
| "no-control-regex": "error", | ||
| "no-debugger": "error", | ||
| "no-delete-var": "error", | ||
| "no-dupe-class-members": "error", | ||
| "no-dupe-else-if": "error", | ||
| "no-dupe-keys": "error", | ||
| "no-duplicate-case": "error", | ||
| "no-empty": "error", | ||
| "no-empty-character-class": "error", | ||
| "no-empty-pattern": "error", | ||
| "no-empty-static-block": "error", | ||
| "no-ex-assign": "error", | ||
| "no-extra-boolean-cast": "error", | ||
| "no-fallthrough": "error", | ||
| "no-func-assign": "error", | ||
| "no-global-assign": "error", | ||
| "no-import-assign": "error", | ||
| "no-invalid-regexp": "error", | ||
| "no-irregular-whitespace": "error", | ||
| "no-loss-of-precision": "error", | ||
| "no-misleading-character-class": "error", | ||
| "no-new-native-nonconstructor": "error", | ||
| "no-nonoctal-decimal-escape": "error", | ||
| "no-obj-calls": "error", | ||
| "no-prototype-builtins": "error", | ||
| "no-redeclare": "error", | ||
| "no-regex-spaces": "error", | ||
| "no-self-assign": "error", | ||
| "no-setter-return": "error", | ||
| "no-shadow-restricted-names": "error", | ||
| "no-sparse-arrays": "error", | ||
| "no-this-before-super": "error", | ||
| "no-unexpected-multiline": "error", | ||
| "no-unreachable": "error", | ||
| "no-unsafe-finally": "error", | ||
| "no-unsafe-negation": "error", | ||
| "no-unsafe-optional-chaining": "error", | ||
| "no-unused-labels": "error", | ||
| "no-unused-private-class-members": "error", | ||
| "no-undef": "error", | ||
| "no-unused-vars": "error", | ||
| "no-useless-backreference": "error", | ||
| "no-useless-catch": "error", | ||
| "no-useless-escape": "error", | ||
| "no-with": "error", | ||
| "require-yield": "error", | ||
| "use-isnan": "error", | ||
| "valid-typeof": "error" | ||
| }, | ||
| "overrides": [ | ||
| { | ||
| "files": [ | ||
| "**/*.js", | ||
| "**/*.cjs" | ||
| ], | ||
| "rules": { | ||
| "no-unused-vars": "off" | ||
| }, | ||
| "globals": { | ||
| "window": "readonly", | ||
| "document": "readonly", | ||
| "console": "readonly", | ||
| "require": "readonly", | ||
| "module": "readonly", | ||
| "exports": "readonly", | ||
| "__dirname": "readonly", | ||
| "process": "readonly", | ||
| "global": "readonly" | ||
| } | ||
| }, | ||
| { | ||
| "files": [ | ||
| "**/*.ts", | ||
| "**/*.tsx" | ||
| ], | ||
| "rules": { | ||
| "jest/expect-expect": "warn", | ||
| "jest/no-alias-methods": "error", | ||
| "jest/no-commented-out-tests": "warn", | ||
| "jest/no-conditional-expect": "error", | ||
| "jest/no-deprecated-functions": "error", | ||
| "jest/no-disabled-tests": "warn", | ||
| "jest/no-done-callback": "error", | ||
| "jest/no-export": "error", | ||
| "jest/no-focused-tests": "error", | ||
| "jest/no-identical-title": "error", | ||
| "jest/no-interpolation-in-snapshots": "error", | ||
| "jest/no-jasmine-globals": "error", | ||
| "jest/no-mocks-import": "error", | ||
| "jest/no-standalone-expect": "error", | ||
| "jest/no-test-prefixes": "error", | ||
| "jest/valid-describe-callback": "error", | ||
| "jest/valid-expect": "error", | ||
| "jest/valid-expect-in-promise": "error", | ||
| "jest/valid-title": "error", | ||
| "curly": [ | ||
| "warn", | ||
| "multi-line" | ||
| ], | ||
| "no-console": "off", | ||
| "no-use-before-define": "off", | ||
| "no-underscore-dangle": "off", | ||
| "no-unused-vars": "off", | ||
| "new-cap": "off", | ||
| "typescript/no-explicit-any": "off" | ||
| }, | ||
| "plugins": [ | ||
| "jest", | ||
| "typescript" | ||
| ], | ||
| "globals": { | ||
| "window": "readonly", | ||
| "document": "readonly", | ||
| "console": "readonly", | ||
| "HTMLElement": "readonly", | ||
| "HTMLDivElement": "readonly", | ||
| "HTMLSpanElement": "readonly", | ||
| "Element": "readonly", | ||
| "DOMRect": "readonly", | ||
| "require": "readonly", | ||
| "module": "readonly", | ||
| "exports": "readonly", | ||
| "__dirname": "readonly", | ||
| "process": "readonly", | ||
| "global": "readonly", | ||
| "jest": "readonly", | ||
| "describe": "readonly", | ||
| "test": "readonly", | ||
| "expect": "readonly", | ||
| "beforeEach": "readonly", | ||
| "afterEach": "readonly", | ||
| "it": "readonly" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restore
no-octalso the lint gate keeps rejecting legacy octal literals.The deleted ESLint configuration applied
js.configs.recommendedto every file, including**/*.cjs. That set enabledno-octal, soyarn lintrejected sloppy-mode literals such as010. The Oxlint configuration disables the correctness category and does not listno-octal. The lint gate therefore accepts those literals. The PR records this as a known gap, but it removes a check that the previous lint gate enforced.Enable
no-octalin the root rules. This restores the base behavior for CommonJS files and keeps ES20150oliterals accepted.Suggested fix
"no-obj-calls": "error", + "no-octal": "error", "no-prototype-builtins": "error",