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

[all] conflict #2075

Closed
Mister-Hope opened this issue May 23, 2020 · 0 comments · Fixed by #2330 or #2352
Closed

[all] conflict #2075

Mister-Hope opened this issue May 23, 2020 · 0 comments · Fixed by #2330 or #2352
Labels
breaking change This change will require a new major version to be released bug Something isn't working default rule options Discussions about default rule options package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Milestone

Comments

@Mister-Hope
Copy link

Mister-Hope commented May 23, 2020

I am opening this issue because this

The all set simply contains every single rule in this plugin, turn on with its default configuration. There may be some conflicts between the rules as defaults do not quite align - please file an issue if you encounter any of these.

A code like this always triggers an error:

const log = (
  msg: string,
  color: "cyan" | "red" = "cyan",
  label = "Sitemap"
): void => console.log(`\n${chalk[color](` ${label} `)} ${msg}`);

will show:

Expected a type annotation.

but if I write

const log = (
  msg: string,
  color: "cyan" | "red" = "cyan",
  label: string = "Sitemap"
): void => console.log(`\n${chalk[color](` ${label} `)} ${msg}`);

will show an error:

Type string trivially inferred from a string literal, remove type annotation.
@Mister-Hope Mister-Hope added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels May 23, 2020
@bradzacher bradzacher added breaking change This change will require a new major version to be released bug Something isn't working default rule options Discussions about default rule options and removed triage Waiting for maintainers to take a look labels May 23, 2020
@bradzacher bradzacher added this to the 4.0.0 milestone Jul 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change This change will require a new major version to be released bug Something isn't working default rule options Discussions about default rule options package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
2 participants