Skip to content

Add no-unnecessary-array-splice-count rule, Rename no-length-as-slice-end to no-unnecessary-slice-end, Support checking Infinity in no-unnecessary-slice-end #2614

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 15 commits into from
Mar 29, 2025

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Mar 28, 2025

  • Rename no-length-as-slice-end to no-unnecessary-slice-end
  • Support checking Infinity in no-unnecessary-slice-end
  • Add no-unnecessary-array-splice-count, use the same logic as no-unnecessary-slice-end

Fixes #2601

@fisker fisker changed the title Add no-unnecessary-array-splice-count rule Add no-unnecessary-array-splice-count rule, Rename no-length-as-slice-end to no-unnecessary-slice-end, Support checking Infinity in no-unnecessary-slice-end Mar 28, 2025
@fisker fisker requested a review from fregante March 28, 2025 11:13
@fisker fisker marked this pull request as ready for review March 28, 2025 11:13
fisker added 3 commits March 28, 2025 19:15
# Conflicts:
#	docs/deleted-and-deprecated-rules.md
.gitignore Outdated
@@ -6,3 +6,4 @@ package-lock.json
.cache-eslint-remote-tester
eslint-remote-tester-results
*.log
.vscode
Copy link
Owner

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure add this to global ignore is a good idea, since many repos actually stores .vscode.
Adding this because my VSCode keeps creating this empty directory.

@sindresorhus sindresorhus merged commit 1922df1 into sindresorhus:main Mar 29, 2025
16 checks passed
@fisker fisker deleted the no-unnecessary-slice-end branch March 29, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no-length-as-slice-end: support splice
2 participants