Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #7005
Closed
Open
Issue created May 07, 2019 by Administrator@rootContributor

no-unexpected-multiline rule clashes with Prettier

Created by: denisw

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:

const Component = styled.div<{
  prop1?: Type;
  prop2?: Type;
}>`
  /* Some styles here... */
`;

The above is the formatting chosen by Prettier. However, CRA's ESLint config doesn't seem to agree:

Line 1:  Unexpected newline between template tag and template literal  no-unexpected-multiline [no-unexpected-multiline]

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.

Assignee
Assign to
Time tracking