-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomerslocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Repro
{
"rules": {
"@typescript-eslint/class-literal-property-style": ["error", "getters"],
"@typescript-eslint/prefer-readonly": "warn"
}
}
export class A {
private readonly foo: string = 'bar';
constructor(foo: string) {
this.foo = foo;
}
}
Expected Result
Code should be unchanged
Actual Result
Code after fix is invalid
export class A {
private get foo() { return 'bar'; }
constructor(foo: string) {
this.foo = foo;
}
}
Additional Info
None
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
3.2.0 |
@typescript-eslint/parser |
3.2.0 |
TypeScript |
3.9.5 |
ESLint |
7.2.0 |
node |
14.2.0 |
npm |
6.14.5 |
yarn |
1.22.4 |
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomerslocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin