-
Notifications
You must be signed in to change notification settings - Fork 0
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
eslint v9 #9
Merged
Merged
eslint v9 #9
Conversation
This file contains 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
and all related dependencies Refresh rules config - to avoid breaking changes. indent rule should work better now - although it's still buggy - there might be reports on code which was not reported before. The biggest pain point might be that `typeof` does not mark a variable as used by `no-unused-vars` rule - now error is reported. Related thread: typescript-eslint/typescript-eslint#10266
denisLoncaric
approved these changes
Jan 10, 2025
and additional cleanup - @types/eslint no longer needed, eslint has types built-in now - decouple from yarn
Published as v3.0.0-rc.0 |
flipace
approved these changes
Jan 13, 2025
@@ -492,7 +474,7 @@ function customize(options: CustomizeOptions = {}) { | |||
], | |||
languageOptions: { | |||
globals: { | |||
...globals.jest, | |||
...jestPlugin.environments.globals.globals, |
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.
😅 .globals.globals
https://perfectionist.dev/rules/sort-named-imports https://perfectionist.dev/rules/sort-named-exports We had named imports sorted in v1 when tslint was taking care of that. But it got lost during migration to eslint, as I wrongly assumed that import/order will take care of that. Later on, the support for sorting named imports (but still not exports) was added to the original eslint-plugin-import import-js/eslint-plugin-import#3043 but we have switched to eslint-plugin-import-x since and the porting request of that feature is still pending. un-ts/eslint-plugin-import-x#225 We could consider switching back to eslint-plugin-import but it still has a set of its own, still unresolved issues. Instead, I decided to try eslint-plugin-perfectionist and the sorting rules from that. Note we are sticking with import/order for sorting and grouping imports for the time being, as more time would be needed to convert the sorting and grouping config to achieve similar behaviour with the perfectionist/sort-imports rule. There is also perfectionist/sort-exports rule, but it does not provide config options to define grouping and custom sorting, to achieve similar behaviour to import/order with our custom config applied, so for now we won't enforce that rule.
Added perfectionist/sort-named-imports and perfectionist/sort-named-exports rules and published as |
for @typescript-eslint/no-empty-object-type rule
v3.0.0-rc.3 is out. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Update eslint to v9 and all related dependencies
Refreshed rules config - to avoid breaking changes.
indent rule
indent rule should work better now - although it's still buggy - there might be reports on code which was not reported before.
The biggest pain point might be that
typeof
does not mark a variable as used byno-unused-vars
rule - now error is reported. Related thread: typescript-eslint/typescript-eslint#10266Added perfectionist/sort-named-imports and perfectionist/sort-named-exports
We had named imports sorted in v1 when tslint was taking care of that. But it got lost during migration to eslint, as I wrongly assumed that import/order will take care of that.
Later on, the support for sorting named imports (but still not exports) was added to the original eslint-plugin-import import-js/eslint-plugin-import#3043 but we have switched to eslint-plugin-import-x since and the porting request of that feature is still pending. un-ts/eslint-plugin-import-x#225
We could consider switching back to eslint-plugin-import but it still has a set of its own, still unresolved issues.
Instead, I decided to try eslint-plugin-perfectionist and the sorting rules from that. Note we are sticking with import/order for sorting and grouping imports for the time being, as more time would be needed to convert the sorting and grouping config to achieve similar behaviour with the perfectionist/sort-imports rule.
There is also perfectionist/sort-exports rule, but it does not provide config options to define grouping and custom sorting, to achieve similar behaviour to import/order with our custom config applied, so for now we won't enforce that rule.