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: add no-unsafe-unary-minus rule #7390

Merged
merged 8 commits into from Nov 13, 2023
Merged

feat: add no-unsafe-unary-minus rule #7390

merged 8 commits into from Nov 13, 2023

Conversation

samestep
Copy link
Contributor

@samestep samestep commented Jul 31, 2023

PR Checklist

Overview

This PR pulls the implementation of the npm package eslint-plugin-unary-minus into this repo, then modifies it to avoid using the TypeChecker methods getUnionType and isTypeAssignableTo which are not public in the TypeScript API; see microsoft/TypeScript#9879.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @samestep!

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.

@netlify
Copy link

netlify bot commented Jul 31, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 86b634a
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/653ead7872c36b0008b3cb11
😎 Deploy Preview https://deploy-preview-7390--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: 96 (🔴 down 3 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (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
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

A solid start, thanks for sending in! ✨

Requesting changes on using more direct, public APIs, and some more testing.

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Aug 5, 2023
@JoshuaKGoldberg
Copy link
Member

👋 Hey @samestep! Just checking in, is this still something you have time for? No worries if not - I just don't want to leave it hanging.

@JoshuaKGoldberg JoshuaKGoldberg added the stale PRs or Issues that are at risk of being or have been closed due to inactivity for a prolonged period label Oct 17, 2023
@samestep
Copy link
Contributor Author

@JoshuaKGoldberg thanks for the ping! Sorry for dropping the ball on this; I'm taking a look now, will see if I can figure out how to restructure it according to the feedback you gave in August.

@JoshuaKGoldberg JoshuaKGoldberg removed the stale PRs or Issues that are at risk of being or have been closed due to inactivity for a prolonged period label Oct 29, 2023
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Looking great! A few comments, mostly more questions than anything else. But I am starting to wonder about increasing the rule's scope... 🤔

@bradzacher bradzacher added the enhancement: new plugin rule New rule request for eslint-plugin label Nov 13, 2023
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

🚀 swell, thanks!

@JoshuaKGoldberg JoshuaKGoldberg merged commit c4709c2 into typescript-eslint:main Nov 13, 2023
46 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting response Issues waiting for a reply from the OP or another party enhancement: new plugin rule New rule request for eslint-plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule proposal: no-implicit-coercion using a negative/minus (-) symbol
4 participants