-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
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 workinghas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Repro
{
"rules": {
"@typescript-eslint/no-inferrable-types": "error",
}
}
class Foo {
prop: number = 5;
}
function fn(a: number = 5, b: boolean = true) {}
Expected Result
Errors for inferrable types on properties and parameters.
Actual Result
No errors.
Additional Info
This is because ignoreParameters
and ignoreProperties
are true
by default, which is inconsistent with TSLint* and seems like an odd choice.
*
I know that you're not aiming for 1:1 with TSLint, but I see no reason to change the defaults in this case.
Also, the documentation says that the above code is invalid
for the default options, but it's not.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
1.13.0 |
@typescript-eslint/parser |
1.13.0 |
TypeScript |
3.4.5 |
ESLint |
6.1.0 |
node |
10.16.0 |
npm |
6.9.0 |
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 workinghas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin