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

Allow spaces after tabs for alignment #14

Merged
merged 1 commit into from
Dec 21, 2019

Conversation

danxuliu
Copy link
Contributor

This is needed for proper alignment of comments in CSS code embedded in Vue files. For example:

-->/* Here starts a long comment that would be too long to have in a
--> * single line so is continued in the next one. */

Otherwise it would need to be written as

-->/* Here starts a long comment that would be too long to have in a
-->* single line so is continued in the next one. */

to prevent the linter from complaining.

See https://eslint.org/docs/rules/no-mixed-spaces-and-tabs#smart-tabs

Important: this change is needed only for the CSS code; the JavaScript code in Vue files already allows tabs followed by spaces for alignment, but I do not know why it works for JavaScript but not for CSS. So I might be using a wrong approach with this rule :-)

For reference, if adding this rule is not desired, an alternative to get properly aligned multiline comments in the CSS code embedded in Vue files would be to set the CSS code as lang="scss" and use:

-->// Here starts a long comment that would be too long to have in a
-->// single line so is continued in the next one.

This is needed for proper alignment of comments in CSS code embedded in
Vue files. For example:
-->/* Here starts a long comment that would be too long to have in a
--> * single line so is continued in the next one. */

See https://eslint.org/docs/rules/no-mixed-spaces-and-tabs#smart-tabs

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Copy link
Contributor

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

Nice!

@skjnldsv skjnldsv merged commit 2ebc632 into master Dec 21, 2019
@skjnldsv skjnldsv deleted the allow-spaces-after-tabs-for-alignment branch December 21, 2019 09:16
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.

2 participants