-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support for react-docgen@5.0.0 #5
Conversation
I guess react-docgen should be a peerDependency if we expect a specific version of it. |
@Jmeyering any chance you can have a look at this PR? 👋 |
@sapegin what about ast-types package? What type of dependency is it? I guess it should always be the same version react-docgen uses. |
Can it be a normal dependency? It has no dependencies itself. The worst thing that can happen, it won't be deduped and we'll ship two version to the client. |
"*.{js,jsx,json}": [ | ||
"prettier --trailing-comma all --write", | ||
"*.js": [ | ||
"npm run prettier", |
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.
just run prettier --write
here instead. Otherwise the *.js
from the script going to render all benefits of lint-staged to zero
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'd also suggest to run eslint --fix
here as well
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.
ok. thx.
"prettier" | ||
], | ||
"rules": { | ||
"prettier/prettier": [ |
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.
Since you use this plugin, you might not need running prettier --write
in lint-staged at all. just eslint --fix
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.
good catch. thx.
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'd advice against that plugin: it's very annoying when you develop, because half of your code is marked as error, but it's just a formatting "issue" that can be autofixed. But you don't want to be distracted when you write code.
Merged and published under 2.0.0 Sorry for the delayed response, missed the initial merge request email apparently. |
Hey @Jmeyering thx for merging. Do you want me to provide changes advised by @sapegin and @okonet in separate PR? |
@Jmeyering we’re in the process of switching to monorepo for styleguidist. Would you mind having this package there as a separate package? |
If you could provide that in a or that would be greatly appreciated!
…On Tue, Jul 2, 2019, 12:10 PM Vladislav Shkodin ***@***.***> wrote:
Hey @Jmeyering <https://github.com/Jmeyering> thx for merging. Do you
want me to provide changes advised by @sapegin
<https://github.com/sapegin> and @okonet <https://github.com/okonet> in
separate PR?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5?email_source=notifications&email_token=ABHNMC5B76KD2M6IEBUXJPDP5ODY5A5CNFSM4HRFRU3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZB6LAI#issuecomment-507766145>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABHNMC4V56TWKJQRYRAYL6LP5ODY5ANCNFSM4HRFRU3A>
.
|
This PR adds support for react-docgen@5.0.0. In addition I've also made some cleanup, like:
If it's too much for one PR, I can close this one and submit another one, that will contain changes only related to react-docgen@5.0.0 support
P.S. One thing I'm not sure about is what type of dependencies ast-types and react-docgen should be. Dependencies or peerDependencies? For now I left them in devDependencies.