Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(eslint-plugin): [prefer-readonly-parameter-types] add option treatMethodsAsReadonly #3733


Copy link

@RebeccaStevens RebeccaStevens commented Aug 15, 2021

fix #1758

Copy link

@typescript-eslint typescript-eslint bot commented Aug 15, 2021

Thanks for the PR, @RebeccaStevens!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!

🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.


@RebeccaStevens RebeccaStevens force-pushed the 1758-treat-methods-as-readonly branch from 7abd090 to af4fa36 Aug 15, 2021
Copy link

@codecov codecov bot commented Aug 15, 2021

Codecov Report

Merging #3733 (8159ec0) into master (5696407) will decrease coverage by 0.86%.
The diff coverage is 100.00%.

Current head 8159ec0 differs from pull request most recent head af431ed. Consider uploading reports for the commit af431ed to get more accurate results

@@            Coverage Diff             @@
##           master    #3733      +/-   ##
- Coverage   93.55%   92.68%   -0.87%     
  Files         147      327     +180     
  Lines        7869    11354    +3485     
  Branches     2493     3202     +709     
+ Hits         7362    10524    +3162     
- Misses        162      369     +207     
- Partials      345      461     +116     
Flag Coverage Δ
unittest 92.68% <100.00%> (-0.87%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...lugin/src/rules/prefer-readonly-parameter-types.ts 100.00% <100.00%> (ø)
packages/eslint-plugin/src/util/isTypeReadonly.ts 97.14% <100.00%> (+2.93%) ⬆️
packages/eslint-plugin/src/rules/dot-notation.ts 92.30% <0.00%> (ø)
...t-plugin/src/rules/prefer-reduce-type-parameter.ts 100.00% <0.00%> (ø)
packages/scope-manager/src/lib/base-config.ts 100.00% <0.00%> (ø)
...experimental-utils/src/eslint-utils/RuleCreator.ts 66.66% <0.00%> (ø)
...plugin-internal/src/rules/prefer-ast-types-enum.ts 90.00% <0.00%> (ø)
packages/typescript-estree/src/convert.ts 98.27% <0.00%> (ø)
.../experimental-utils/src/ts-eslint-scope/analyze.ts 100.00% <0.00%> (ø)
packages/scope-manager/src/scope/FunctionScope.ts 92.30% <0.00%> (ø)
... and 175 more


@RebeccaStevens RebeccaStevens force-pushed the 1758-treat-methods-as-readonly branch from 205f5e6 to af431ed Aug 30, 2021
Copy link

@bradzacher bradzacher left a comment

LGTM - thanks for this!


@bradzacher bradzacher merged commit a46e318 into typescript-eslint:master Sep 3, 2021
11 checks passed
@RebeccaStevens RebeccaStevens deleted the 1758-treat-methods-as-readonly branch Sep 4, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants