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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add linting step for extraneous elements in SVGs #3239
Add linting step for extraneous elements in SVGs #3239
Conversation
... such as a trailing "s" in the Quasar SVG (#3221)
Other than the change above, this looks good to go to me. When I get around to reviewing the complete markup for all our icons, we may need to expand on this to include other checks. Although, if we could somehow automate fixing niggly little things like this, that, I think, would be a better solution. |
Co-authored-by: Peter Noble <PeterShaggyNoble@users.noreply.github.com>
Changed it 馃憤 Thanks for the suggestion
I'd suggest defining a separate custom check for each of those.
Even if we do that, it's still useful to have this 1) just in case and 2) for anyone to check their contributions locally. |
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.
This looks good to me now, Eric 馃憤 As it involves a change to our linting, though, let's get one of the other @simple-icons/maintainers to throw an eye over it, too.
I'd suggest defining a separate custom check for each of those.
My plan at the moment is to identify the problems in our existing icons and open an issue with a list for discussion on which ones we want to fix and which ones we want to add tests for (at which stage we can discuss the implementation also) then submit a PR to manually fix those icons and then begin working on the linting separately.
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.
Thank you for the work! It looks great and is a fine addition [insert star wars meme here] 馃憤
Issue: Closes #3223
Description
This adds a new custom linter to the SVG linter (
npm run svglint
) that checks if SVGs start with<svg
and end in</svg>
(allowing for a single newline).It works as expected, as illustrated by this build failure, which was fixed in 498561c (the icon had one trailing whitespace).
Suggested regarding the error message and reporter name are welcome 馃槃