-
Notifications
You must be signed in to change notification settings - Fork 12
chore: migrate from eslint to oxlint #623
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
2 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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import { defineConfig } from '@apify/oxlint-config'; | ||
|
|
||
| export default defineConfig({ | ||
| ignorePatterns: ['**/node_modules', '**/dist', 'coverage'], | ||
| rules: { | ||
| 'typescript/no-explicit-any': 'off', | ||
| 'no-param-reassign': 'off', | ||
| }, | ||
| overrides: [ | ||
| { | ||
| files: ['*.config.ts', '*.config.mts', 'packages/*/tsup.config.ts'], | ||
| rules: { | ||
| 'no-console': 'off', | ||
| 'import/no-default-export': 'off', | ||
| }, | ||
| }, | ||
| { | ||
| files: ['test/**'], | ||
| rules: { | ||
| 'no-console': 'off', | ||
| 'no-useless-constructor': 'off', | ||
| 'typescript/ban-ts-comment': 'off', | ||
| 'jest/no-conditional-expect': 'off', | ||
| 'vitest/no-conditional-expect': 'off', | ||
| 'jest/expect-expect': 'off', | ||
| 'vitest/expect-expect': 'off', | ||
| 'jest/no-standalone-expect': 'off', | ||
| 'vitest/no-standalone-expect': 'off', | ||
| }, | ||
| }, | ||
| { | ||
| files: ['packages/json_schemas/scripts/**', 'packages/json_schemas/tools/**'], | ||
| rules: { | ||
| 'no-console': 'off', | ||
| }, | ||
| }, | ||
| ], | ||
| }); | ||
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,4 +1,3 @@ | ||
| import { createTsupConfig } from '../../scripts/tsup.config'; | ||
|
|
||
| // eslint-disable-next-line import-x/no-default-export | ||
| export default createTsupConfig({}); |
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
1 change: 0 additions & 1 deletion
1
packages/json_schemas/tools/modificator/description-file-utils.ts
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
2 changes: 0 additions & 2 deletions
2
packages/json_schemas/tools/modificator/rules/add-description-rule.ts
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 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 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 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
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.
Some of these rules seem reasonable - is there a reason why we are disabling these? I don't see their equivalents in the
eslintsetup.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.
It might be all right in here, this is mostly based on
apify-corewhere those triggered a lot of warnings due to false positives. I'll see if I can enable them here.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.
Tested each — turned them on one at a time and counted violations:
typescript/no-explicit-anyno-param-reassigntypescript/no-empty-object-typetypescript/no-unsafe-declaration-mergingimport/extensionsno-empty-function'off', drop redundant overrideno-use-before-defineno-voidallowAsStatement: true, drop our overridePushed as a separate commit on top of this branch so you can see the diff. The fixes are mostly removing the empty-interface declaration-merging trick (no longer needed) and switching mutually-recursive listener arrows to
functiondeclarations.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.
I meant mostly the
jest/*andvitest/*rules, but it's cool we managed to shrink the main ruleset as well 👍