Skip to content

chore(eslint-plugin): [naming-convention] refactor rule to split it up #2816

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

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

bradzacher
Copy link
Member

The rule file was up to 1700 LOC.
It was a pain in the butt to scroll around it and find pieces.
I'm pretty sure ESLint / TypeScript gets a bit choked up on a file that large as well (I've been running into all sorts of slowness with it).

So simply isolate each part into a module to better separate things and reduce the total LOC per file.

Also moved some stuff around in the docs to try and focus each section, and add an FAQ section for the misc stuff

@bradzacher bradzacher added the refactor PRs that refactor code only label Nov 25, 2020
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

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.

The rule file was up to 1700 LOC.
It was a pain in the butt to scroll around it and find pieces.
I'm pretty sure ESLint / TypeScript gets a bit choked up on a file that large as well (I've been running into all sorts of slowness with it).

So simply isolate each part into a module to better separate things and reduce the total LOC per file.

Also moved some stuff around in the docs to try and focus each section, and add an FAQ section for the misc stuff
@bradzacher bradzacher force-pushed the refactor-naming-convention branch from 504866c to 18bf372 Compare November 25, 2020 20:32
@codecov
Copy link

codecov bot commented Nov 25, 2020

Codecov Report

Merging #2816 (fe42ba8) into master (6fc8409) will decrease coverage by 0.00%.
The diff coverage is 94.82%.

@@            Coverage Diff             @@
##           master    #2816      +/-   ##
==========================================
- Coverage   92.74%   92.74%   -0.01%     
==========================================
  Files         302      309       +7     
  Lines       10269    10320      +51     
  Branches     2909     2920      +11     
==========================================
+ Hits         9524     9571      +47     
  Misses        346      346              
- Partials      399      403       +4     
Flag Coverage Δ
unittest 92.74% <94.82%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...plugin/src/rules/explicit-module-boundary-types.ts 88.74% <50.00%> (-0.53%) ⬇️
.../eslint-plugin/src/rules/triple-slash-reference.ts 93.54% <66.66%> (-3.12%) ⬇️
packages/eslint-plugin/src/rules/unbound-method.ts 93.10% <75.00%> (-1.96%) ⬇️
...plugin/src/rules/naming-convention-utils/format.ts 83.33% <83.33%> (ø)
...plugin/src/rules/naming-convention-utils/schema.ts 93.33% <93.33%> (ø)
...gin/src/rules/naming-convention-utils/validator.ts 95.48% <95.48%> (ø)
...lugin/src/rules/consistent-indexed-object-style.ts 89.36% <100.00%> (+0.47%) ⬆️
...eslint-plugin/src/rules/consistent-type-imports.ts 97.15% <100.00%> (+0.24%) ⬆️
...-plugin/src/rules/naming-convention-utils/enums.ts 100.00% <100.00%> (ø)
...-plugin/src/rules/naming-convention-utils/index.ts 100.00% <100.00%> (ø)
... and 10 more

@bradzacher bradzacher merged commit 14758d2 into master Nov 25, 2020
@bradzacher bradzacher deleted the refactor-naming-convention branch November 25, 2020 20:51
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
refactor PRs that refactor code only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant