-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Make @typescript-eslint optional peerDependencies #8376
Make @typescript-eslint optional peerDependencies #8376
Conversation
@ThewBear : can you fix the failing job 🙏 ? |
The test fails when using yarn PnP. |
|
||
overrides: [ | ||
{ | ||
// Lint tsx only if typescript is installed. |
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.
Probably it's not worth it since if you have ts
files, you already have to install typescript:
This looks to be an alternative fix: #9310
|
Create an |
Closing this now as it is too old. |
Problem
Currently
eslint-config-react-app
requires@typescript-eslint
to be installed in every project even the project that doesn't use typescript. This lead to the warning of missingtypescript
(#6834, #6859).
Solution
By making
@typescript-eslint
an optional peerDependencies, non-typescript user doesn't need to installed@typescript-eslint
and can get rid of the warning. User who use typescript can installedtypescript
along with@typescript-eslint/eslint-plugin
and@typescript-eslint/parser
.