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

Conversation

RebeccaStevens
Copy link
Contributor

fix #1758

@typescript-eslint
Copy link
Contributor

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 https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@codecov
Copy link

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

@bradzacher bradzacher added enhancement New feature or request enhancement: plugin rule option New rule option for an existing eslint-plugin rule and removed enhancement New feature or request labels Aug 16, 2021
@RebeccaStevens RebeccaStevens force-pushed the 1758-treat-methods-as-readonly branch 4 times, most recently from cd96b27 to 205f5e6 Compare August 18, 2021 18:39
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for this!

@bradzacher bradzacher merged commit a46e318 into typescript-eslint:master Sep 3, 2021
@RebeccaStevens RebeccaStevens deleted the 1758-treat-methods-as-readonly branch September 4, 2021 11:20
@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.
Labels
enhancement: plugin rule option New rule option for an existing eslint-plugin rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[prefer-readonly-parameter-types] Support all readonly built-in types
2 participants