Skip to content
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 and template literal with typescript #11650

Closed
quolpr opened this issue Apr 24, 2019 · 5 comments
Closed

no-unexpected-multiline and template literal with typescript #11650

quolpr opened this issue Apr 24, 2019 · 5 comments
Assignees
Labels
3rd party plugin This is an issue related to a 3rd party plugin, config, or parser archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules

Comments

@quolpr
Copy link

quolpr commented Apr 24, 2019

Tell us about your environment

  • eslint 6.9.0
  • node v11.6.0
  • npm 6.9.0
  • typescript 3.3.4

What parser (default, Babel-ESLint, etc.) are you using?

Not sure. I use CRA 3 without ejecting.

Please show your full configuration:

Configuration
{
  "extends": "react-app"
}

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

function myTag<T>(...args): any {
  return undefined;
}

export const test = myTag<{
  field: boolean;
}>`
  test;
`;

The command:

eslint --ext js,ts,ts,tsx src

What did you expect to happen?

No eslint warnings will be raised

What actually happened? Please include the actual, raw output from ESLint.

./src/test.ts
  Line 5:  Unexpected newline between template tag and template literal  no-unexpected-multiline

But with

function myTag<T>(...args): any {
  return undefined;
}

export const test = myTag<{ field: boolean }>`
  test;
`;

No warnings are showing.

It especially frustrates when you are using styled-components and component have a lot of props, that will not fit the maximum line length.

@quolpr quolpr added bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon labels Apr 24, 2019
@aladdin-add aladdin-add added bounty Someone has posted a bounty for this issue on BountySource evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon bounty Someone has posted a bounty for this issue on BountySource labels Apr 25, 2019
@eslint-deprecated eslint-deprecated bot added the auto closed The bot closed this issue label May 26, 2019
@eslint-deprecated
Copy link

Unfortunately, it looks like there wasn't enough interest from the team
or community to implement this change. While we wish we'd be able to
accommodate everyone's requests, we do need to prioritize. We've found
that issues failing to reach accepted status after 21 days tend to
never be accepted, and as such, we close those issues.
This doesn't mean the idea isn't interesting or useful, just that it's
not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.

@mysticatea mysticatea reopened this May 26, 2019
@mysticatea mysticatea removed the auto closed The bot closed this issue label May 26, 2019
@mysticatea mysticatea self-assigned this May 26, 2019
@hardfist
Copy link

same issue, prettier will automatic format

export const test = myTag<{ field: boolean }>`
  test;
`;

to

export const test = myTag<{
  field: boolean;
}>`
  test;
`;

which will cause eslint error, which is verify frustrating

@kaicataldo kaicataldo added the 3rd party plugin This is an issue related to a 3rd party plugin, config, or parser label Sep 29, 2019
@kaicataldo
Copy link
Member

Sorry this is so late - looks like this slipped through the cracks. Does this issue occur with the default parser? If not, this should probably be reported in the typescript-eslint repository.

@hardfist Prettier doesn't conform to ESLint's configuration, so if you're using Prettier for formatting you should turn any ESLint formatting rules off.

@mdjermanovic
Copy link
Member

I believe this issue can be closed since it was fixed by #11698 (released in v6.7.2)

@aladdin-add
Copy link
Member

Closing because there hasn't been activity for a few days. If it still occurs, please file a new issue. thanks!

@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Jan 6, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jan 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3rd party plugin This is an issue related to a 3rd party plugin, config, or parser archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules
Projects
None yet
Development

No branches or pull requests

6 participants