Closed
Description
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 |