-
-
Notifications
You must be signed in to change notification settings - Fork 545
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
Linting SVG files #1642
Linting SVG files #1642
Conversation
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.
Maybe split the PR into:
- Adding linting of svgs
- Run linting of svgs in PRs
Co-authored-by: Jakob Guddas <[email protected]>
Co-authored-by: Jakob Guddas <[email protected]>
…nto svg-eslint
…nto svg-eslint
@jguddas Thanks for your feedback! |
@@ -29,21 +29,22 @@ | |||
"generate:contributors": "node ./scripts/updateContributors.mjs icons/*.svg", | |||
"generate:nextJSAliases": "node ./scripts/generateNextJSAliases.mjs", | |||
"postinstall": "husky install", | |||
"lint:js": "eslint --ext .ts,.js,.mjs ./{packages/lucide,scripts}", |
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.
Now the :js name does not make sense anymore.
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.
true, i've renamed it to lint:es
😛
@@ -0,0 +1,20 @@ | |||
{ |
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.
Why do we have this file now?
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.
When running Eslint running from the root, it reads also TS files, which requires a tsconfig in the root.
What is the purpose of this pull request?
Description
This adds a feature to lint SVG files. I've implemented the
@html-eslint
with some rules that match our way of writing the SVGs.Because it is part of ESLint, lint-staged will check the format of SVGs.
I also added a GitHub action to check this when a PR is opened. GitHub will automatically add a comment if the formatting is incorrect.