-
Notifications
You must be signed in to change notification settings - Fork 993
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: brought in typescript-eslint@v8 with stylistic preset (#10911)
This applies two internal tooling updates: * Bumps typescript-eslint to its beta v8: https://typescript-eslint.io/blog/announcing-typescript-eslint-v8-beta * Enables typescript-eslint's [shared `stylistic` config](https://typescript-eslint.io/users/configs#stylistic) for internal code (not `eslint-config`) Any changes (will be) commented inline. This also doesn't tackle three good followups: * Rules with many existing reports I kept disabled under a `TODO:` comment in `.eslintrc.js` * A reasonable next step for the project would be to look through those and decide which should be fixed up. * This doesn't enable [typed linting](https://typescript-eslint.io/getting-started/typed-linting) internally * Would definitely recommend next! * Onboarding to ESLint's flat config * Blocked on #10897 **There should be no user-facing functional changes**. It should just be cleanups.⚠️ This isn't ready for merge, as it uses `rc-v8` versions of `typescript-eslint`. Just posting as a reference prior to v8 going stable. * Once v8 is stable, I can update this to use the released version. * Alternately, if you'd like these changes sooner, I can make a version of this that doesn't update to `rc-v8` - it'll just have slightly fewer changes... This PR came out of a casual conversation with @Tobbe. I'm happy to file an issue / make a more formal internal tooling request if you'd prefer. ❤️ --------- Co-authored-by: Tobbe Lundberg <tobbe@tlundberg.com> Co-authored-by: Josh GM Walker <56300765+Josh-Walker-GM@users.noreply.github.com>
- Loading branch information
1 parent
8d2c049
commit 25630e9
Showing
5 changed files
with
172 additions
and
128 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
- chore: brought in typescript-eslint@v8 with stylistic preset (#10911) by @JoshuaKGoldberg | ||
|
||
This change updates Redwood linting config and introduces some changes to the linting rules that are applied to your project. | ||
|
||
Specifically: | ||
|
||
1. `jsx-a11y/no-noninteractive-element-to-interactive-role` has it's default config updated. | ||
3. `@typescript-eslint/explicit-function-return-type` used to be turned off, now it's no longer applied. | ||
4. `@typescript-eslint/no-empty-interface` - used to be turned off, now it's no longer applied. | ||
5. `@typescript-eslint/explicit-module-boundary-types` - used be turned off, now it's no longer applied. | ||
6. `@typescript-eslint/ban-types` - used to be 'warn', now it's no longer applied. This has been replaces with a set of smaller more specific rules. | ||
7. `no-empty-function` - used be turned off, now it's no longer applied. The ts-eslint flavour is still there and turned off still. | ||
8. `camelcase` - used to be turned off, now it's 'warn'. | ||
9. `@typescript-eslint/camelcase` - used to be turned off, now it's no longer applied. | ||
10. `no-use-before-define` - used to be turned off, now it's no longer applied. | ||
11. `@typescript-eslint/no-use-before-define` - used to be turned off, now it's no longer applied. | ||
12. `@typescript-eslint/prefer-namespace-keyword` - used to be turned off, now it's 'error' | ||
13. `unicode-bom` - used to be turned off, now it's no longer applied. | ||
14. `@typescript-eslint/adjacent-overload-signatures` - used to be 'error', now it's no longer applied. | ||
15. `@typescript-eslint/no-explicit-any` - used be 'warn', now 'error' | ||
16. `@typescript-eslint/no-inferrable-types` - used to be 'error', now it's no longer applied. | ||
17. `no-loss-of-precision` - used be 'off', now 'error' | ||
18. `@typescript-eslint/no-loss-of-precision` - used be 'error', now it's no longer applied. | ||
19. `@typescript-eslint/no-non-null-assertion` - used be 'warn', now it's no longer applied. | ||
20. `valid-typeof` - used be either 'error' or 'off', now always 'error' | ||
21. `no-unused-expressions` - used be always 'error', now either 'error' or 'off' | ||
22. `@typescript-eslint/prefer-function-type` - newly added as 'off' | ||
23. `@typescript-eslint/no-require-imports` - newly added as 'off' | ||
24. `@typescript-eslint/no-empty-object-type` - newly added as 'off' | ||
25. `unicorn/template-indent` - newly added as 'off' | ||
26. `@typescript-eslint/no-duplicate-enum-values` - newly added as 'error' | ||
27. `@typescript-eslint/no-unsafe-declaration-merging` - newly added as 'error' | ||
28. `@typescript-eslint/no-unsafe-function-type` - newly added as 'error' | ||
29. `@typescript-eslint/no-unused-expressions` - newly added as 'error' | ||
30. `@typescript-eslint/no-wrapper-object-types` - newly added as 'error' | ||
31. `no-new-native-nonconstructor` - newly added as 'off' |
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
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
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
Oops, something went wrong.