-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Labels
breaking changeThis change will require a new major version to be releasedThis change will require a new major version to be releasedbugSomething isn't workingSomething isn't workingdefault rule optionsDiscussions about default rule optionsDiscussions about default rule optionspackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Milestone
Description
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
Labels
breaking changeThis change will require a new major version to be releasedThis change will require a new major version to be releasedbugSomething isn't workingSomething isn't workingdefault rule optionsDiscussions about default rule optionsDiscussions about default rule optionspackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin