Skip to content

[all] conflict #2075

Closed
@Mister-Hope

Description

@Mister-Hope

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeThis change will require a new major version to be releasedbugSomething isn't workingdefault rule optionsDiscussions about default rule optionspackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions