-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
no-unexpected-multiline rule clashes with Prettier #7005
Labels
Milestone
Comments
this is crazy annoying, one kind of a workaround I found so far is replacing this export const Checkbox = styled.input<
React.HTMLAttributes<HTMLInputElement> & SpaceProps
>`` with this type Props = React.HTMLAttributes<HTMLInputElement> & SpaceProps;
export const Checkbox = styled.input<Props>`` |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
just ran into this issue. had to downgrade below |
This comment has been minimized.
This comment has been minimized.
I added this to my package.json (i'm using typescript)
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am using TypeScript, Prettier (1.17.0) and
styled-components
in a CRA app. When I define the prop types of my styled components inline, I end up with constructs like these:The above is the formatting chosen by Prettier. However, CRA's ESLint config doesn't seem to agree:
This means that when I use the pattern above, it is impossible for me to use ESLint and create-react-app together without getting linter errors. It would be cool if the
no-unexpected-multiline
rule could be either disabled or configured to not trigger in the cases that Prettier creates.The text was updated successfully, but these errors were encountered: