8000 [no-inferrable-types][typedef] Rules clash in 'all' config · Issue #902 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content
[no-inferrable-types][typedef] Rules clash in 'all' config #902
Closed
@fernandopasik

Description

@fernandopasik

Seems to have a clash between those rules in all config. Am I missing something to make this case pass?

Repro

{
  "extends": [
    "airbnb-base",
    "plugin:@typescript-eslint/all",
  ]
}
class HelloWorld {
  protected who?: string = 'world';
}

This will result in
error Type string trivially inferred from a string literal, remove type annotation @typescript-eslint/no-inferrable-types

class HelloWorld {
  protected who = 'world';
}

This will result in
error expected who to have a type annotation @typescript-eslint/typedef

Versions

package version
@typescript-eslint/eslint-plugin 2.0.0
@typescript-eslint/parser 2.0.0
TypeScript 3.5.3
ESLint 6.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdefault rule optionsDiscussions about default rule optionspackage: 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

      0