-
Notifications
You must be signed in to change notification settings - Fork 129
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
fix: "no-dangle-underscore", and other nits. #621
Conversation
This will have to wait for typescript-eslint to also update to v9, in the meantime this PR can't build in CI. Watching: typescript-eslint/typescript-eslint#8211 |
src/sample.ts
Outdated
@@ -102,6 +102,7 @@ export function sample(...args: ReadonlyArray<unknown>): unknown { | |||
return purry(sampleImplementation, args); | |||
} | |||
|
|||
// eslint-disable-next-line max-statements -- TODO: Can we simplify or split this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: i see this function has a lot of guards, which we don't really have in other functions. for example, for chunk
, we don't check that size
is a positive integer. if we eliminate this, that'd bring us under the limit right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are right and it also looks like how the built-in functions chose to handle this: for example [1,2,3].slice(1.5)
.
I'll remove them
b0f860d
to
d1897b5
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9d730c4:
|
It's taking the community longer than I thought to migrate to eslint v9, and the resulting changes in this PR don't need v9 to work - so we can ship the changes to the config itself later. This mainly removes the underscore-based private functions in favor of proper names and directories. Also removes runtime protections from sample which was the only function we had with runtime protections. |
🎉 This PR is included in version 2.0.0-beta.26 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
And follow up with going over new rules and old rules and making sure our config is top-notch.