-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[prefer-readonly] False positive on fields within mixin classes #2590
Copy link
Copy link
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 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
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 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
Repro
Using the repo code from https://github.com/WGroenestein/typescript-eslint-prefer-readonly-class-mixin
Expected Result
Fields which are assigned outside the constructor (e.g. setters) in mixin classes are not marked as not assigned / readonly
Actual Result
They are reported as errors, and when running --fix it breaks the build
Additional Info
The debug log can be found in the repo (https://github.com/WGroenestein/typescript-eslint-prefer-readonly-class-mixin/blob/master/debug.log)
Versions
@typescript-eslint/eslint-plugin4.2.0@typescript-eslint/parser4.2.0TypeScript4.0.3ESLint7.9.0node12.18.3