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): [naming-convention] better error message and docs for prefix/suffix #2195

Merged
merged 3 commits into from Jun 9, 2020

Conversation

villelahdenvuo
Copy link
Contributor

@villelahdenvuo villelahdenvuo commented Jun 9, 2020

  • Make error message more clear about trimming.
  • Docs: add a note about prefix being trimmed before format is validated to make it more noticeable.

Addresses #2187

Here's the current error message:
MicrosoftTeams-image

Proposed error message:

Variable name isStore trimmed as Store must match one of the following formats: UPPER_CASE, camelCase

Better wording can be considered, I tried to keep it short and informative.

Add a note about prefix being trimmed before format is validated to make it more noticeable.
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @villelahdenvuo!

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.

@villelahdenvuo villelahdenvuo changed the title docs(eslint-plugin): note about prefix trimming docs(eslint-plugin): [naming-convention] note about prefix trimming Jun 9, 2020
@codecov
Copy link

codecov bot commented Jun 9, 2020

Codecov Report

Merging #2195 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2195   +/-   ##
=======================================
  Coverage   93.42%   93.42%           
=======================================
  Files         173      173           
  Lines        7861     7862    +1     
  Branches     2242     2243    +1     
=======================================
+ Hits         7344     7345    +1     
  Misses        245      245           
  Partials      272      272           
Flag Coverage Δ
#unittest 93.42% <100.00%> (+<0.01%) ⬆️
Impacted Files Coverage Δ
...kages/eslint-plugin/src/rules/naming-convention.ts 88.82% <100.00%> (+0.03%) ⬆️

@villelahdenvuo villelahdenvuo changed the title docs(eslint-plugin): [naming-convention] note about prefix trimming docs(eslint-plugin): [naming-convention] better error message and docs for prefix/suffix Jun 9, 2020
@bradzacher bradzacher changed the title docs(eslint-plugin): [naming-convention] better error message and docs for prefix/suffix f(eeatslint-plugin): [naming-convention] better error message and docs for prefix/suffix Jun 9, 2020
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.

thanks heaps for contributing to the clarity of the complicated rule!!

@bradzacher bradzacher changed the title f(eeatslint-plugin): [naming-convention] better error message and docs for prefix/suffix feat(eslint-plugin): [naming-convention] better error message and docs for prefix/suffix Jun 9, 2020
@bradzacher bradzacher added the enhancement New feature or request label Jun 9, 2020
@bradzacher bradzacher merged commit a2ffe55 into typescript-eslint:master Jun 9, 2020
@villelahdenvuo villelahdenvuo deleted the patch-1 branch June 10, 2020 07:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants