Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[no-inferrable-types] Change defaults? + incorrect documentation #822

Closed
Labels
breaking changeThis change will require a new major version to be releasedbugSomething isn't workinghas prthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@glen-84

Description

@glen-84

Repro

{"rules": {"@typescript-eslint/no-inferrable-types":"error",  }}
classFoo{prop:number=5;}functionfn(a:number=5,b:boolean=true){}

Expected Result

Errors for inferrable types on properties and parameters.

Actual Result

No errors.

Additional Info

This is becauseignoreParameters andignoreProperties aretrue 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 isinvalid for the default options, but it's not.

Versions

packageversion
@typescript-eslint/eslint-plugin1.13.0
@typescript-eslint/parser1.13.0
TypeScript3.4.5
ESLint6.1.0
node10.16.0
npm6.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeThis change will require a new major version to be releasedbugSomething isn't workinghas prthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp