-
-
Notifications
You must be signed in to change notification settings - Fork 697
feat(vue/no-multi-spaces): add ignoreEOLComments property #2989
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
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 7b93db3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
FloEdelmann
left a comment
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.
Looks good to me, thank you! 🙂
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.
Pull request overview
This PR adds a new ignoreEOLComments option to the vue/no-multi-spaces rule, allowing users to preserve multiple spaces before end-of-line comments for alignment purposes. When enabled, the rule will ignore multiple spaces that appear before line comments (//) or block comments (/* */) at the end of a line.
Key Changes
- Added
ignoreEOLCommentsboolean option to the rule schema with a default value offalse - Implemented logic to detect comments at the end of lines and conditionally ignore spaces before them
- Added test cases demonstrating both valid and invalid usage with the new option
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
lib/rules/no-multi-spaces.js |
Added schema property and implementation logic to detect and ignore spaces before EOL comments when the option is enabled |
tests/lib/rules/no-multi-spaces.js |
Added valid test cases showing comments with multiple spaces when ignoreEOLComments: true, and invalid test cases showing they're flagged when ignoreEOLComments: false |
docs/rules/no-multi-spaces.md |
Added documentation for the new option with usage examples showing alignment of comments |
.changeset/swift-spies-nail.md |
Added changeset entry documenting this as a minor version feature addition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
resolves #2666