Skip to content

chore: enabled eslint-plugin-perfectionist on utils #9698

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

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Aug 1, 2024

PR Checklist

Overview

Enables eslint-plugin-perfectionist on just one package to start: packages/utils.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @JoshuaKGoldberg!

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.

Copy link

netlify bot commented Aug 1, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 59df291
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/66c4d3ece10e120008a55209
😎 Deploy Preview https://deploy-preview-9698--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (🟢 up 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 90 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

nx-cloud bot commented Aug 1, 2024

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.

Project coverage is 88.01%. Comparing base (94f7c99) to head (59df291).
Report is 2 commits behind head on main.

Files Patch % Lines
packages/utils/src/ast-utils/predicates.ts 0.00% 3 Missing ⚠️
packages/utils/src/ts-eslint/ESLint.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9698   +/-   ##
=======================================
  Coverage   88.01%   88.01%           
=======================================
  Files         406      406           
  Lines       13879    13879           
  Branches     4055     4055           
=======================================
  Hits        12216    12216           
  Misses       1354     1354           
  Partials      309      309           
Flag Coverage Δ
unittest 88.01% <42.85%> (ø)

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

Files Coverage Δ
...utils/src/ast-utils/eslint-utils/PatternMatcher.ts 66.66% <ø> (ø)
...ils/src/ast-utils/eslint-utils/ReferenceTracker.ts 85.71% <ø> (ø)
...s/utils/src/ast-utils/eslint-utils/astUtilities.ts 53.33% <ø> (ø)
...ges/utils/src/ast-utils/eslint-utils/predicates.ts 51.11% <ø> (ø)
packages/utils/src/ast-utils/helpers.ts 68.18% <ø> (ø)
packages/utils/src/eslint-utils/RuleCreator.ts 66.66% <ø> (ø)
...ckages/utils/src/eslint-utils/getParserServices.ts 94.11% <ø> (ø)
packages/utils/src/eslint-utils/index.ts 100.00% <100.00%> (ø)
packages/utils/src/ts-eslint/Linter.ts 50.00% <ø> (ø)
packages/utils/src/ts-eslint/RuleTester.ts 50.00% <ø> (ø)
... and 4 more

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review August 12, 2024 16:32
@JoshuaKGoldberg JoshuaKGoldberg requested review from a team and removed request for abrahamguo August 12, 2024 17:03
bradzacher
bradzacher previously approved these changes Aug 13, 2024
@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Aug 13, 2024
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
bradzacher
bradzacher previously approved these changes Aug 14, 2024
@kirkwaiblinger
Copy link
Member

I'm -0.5 on proceeding with this due to the null | string behavior that exists for now (#9698 (comment)). But if that's deemed an accepted drawback, then I approve this PR.

@bradzacher
Copy link
Member

Have we got an issue filed upstream?
I feel like a "put nullish types last" option probably would be a good default.

@JoshuaKGoldberg
Copy link
Member Author

JoshuaKGoldberg commented Aug 19, 2024

Filed azat-io/eslint-plugin-perfectionist#223. There's a groups option but I couldn't tell from the docs what the sanctioned way to do this is.

Edit: shoutout & thanks @hugop95 for azat-io/eslint-plugin-perfectionist#223 (comment) !

@JoshuaKGoldberg JoshuaKGoldberg added blocked by another issue Issues which are not ready because another issue needs to be resolved first and removed 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labels Aug 19, 2024
@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as draft August 19, 2024 12:41
kirkwaiblinger
kirkwaiblinger previously approved these changes Aug 20, 2024
Copy link
Member

@kirkwaiblinger kirkwaiblinger left a comment

Choose a reason for hiding this comment

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

🚀😁

@JoshuaKGoldberg JoshuaKGoldberg removed the blocked by another issue Issues which are not ready because another issue needs to be resolved first label Aug 20, 2024
kirkwaiblinger
kirkwaiblinger previously approved these changes Aug 20, 2024
@kirkwaiblinger kirkwaiblinger added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Aug 20, 2024
@JoshuaKGoldberg JoshuaKGoldberg merged commit 6250dab into typescript-eslint:main Aug 20, 2024
60 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the eslint-plugin-perfectionist-utils branch August 20, 2024 17:55
Comment on lines 19 to +27
export type GlobalVariableOptionBase =
| 'off'
| 'readable'
| 'readonly'
| 'writable'
| /** @deprecated use `'writable'` */ 'writeable'
| /** @deprecated use `'readonly'` */ 'readable';
| /** @deprecated use `'writable'` */ 'writable'
| /** @deprecated use `'readonly'` */ 'writeable';
export type GlobalVariableOptionBoolean =
| /** @deprecated use `'writable'` */ true
| /** @deprecated use `'readonly'` */ false;
| /** @deprecated use `'writable'` */ false
| /** @deprecated use `'readonly'` */ true;
Copy link
Contributor

Choose a reason for hiding this comment

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

The comments are out of place now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, nice! Thanks for the catch :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines 252 to +255
files?: (
| string
// yes, a single layer of array nesting is supported
| string[]
// yes, a single layer of array nesting is supported
| string
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment should still be before string[].

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants