Skip to content

build(eslint): enable rule @typescript-eslint/prefer-readonly#2296

Open
spliffone wants to merge 1 commit into
mainfrom
build/eslint-private-readonly-rule
Open

build(eslint): enable rule @typescript-eslint/prefer-readonly#2296
spliffone wants to merge 1 commit into
mainfrom
build/eslint-private-readonly-rule

Conversation

@spliffone

@spliffone spliffone commented Jul 8, 2026

Copy link
Copy Markdown
Member

@spliffone spliffone requested review from a team as code owners July 8, 2026 15:04
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@spliffone spliffone force-pushed the build/eslint-private-readonly-rule branch from bc0550f to 5ec61b3 Compare July 8, 2026 15:16
@dr-itz

dr-itz commented Jul 8, 2026

Copy link
Copy Markdown
Member

IMO this adds little value. I.e. if a private member is readonly or not is such a minor detail that it does not justify all the churn created. Traceability of changes is more important. But maybe that's just me.

* The focus on close is only relevant when the directive is configured without a calendar button.
*/
private overlaySubscriptions?: Subscription[];
private readonly overlaySubscriptions?: Subscription[];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's just complete non-sense. This is undefined and then can never be set. Begs the question if this is unused and can be removed instead

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right I dropped it.

Comment thread projects/element-ng/datepicker/si-timepicker.component.ts
@spliffone spliffone force-pushed the build/eslint-private-readonly-rule branch from 5ec61b3 to 651a3f0 Compare July 8, 2026 17:13
@spike-rabbit

Copy link
Copy Markdown
Member

@dr-itz this came up, as I was annoyed always having review feedback to have injected things as readonly.
This rule would partially solve this for private members.

But still, for public stuff contributing a dedicated rule to anguar-eslint might be more usefull

@spliffone spliffone force-pushed the build/eslint-private-readonly-rule branch from 651a3f0 to 33e7617 Compare July 8, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants