-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Update or add a JSON linting step in Travis CI to check for formatting issues #1324
Comments
After a little reading, it would appear that JSON schema validation doesn’t have the ability to check formatting, and the linter we use Additionally it's worth noting that there are two versions of #527, #528, #529 are where json linting first came into the project. |
I've looked around a bit but there seems to be no available linter that just lints white space no matter the filetype/syntax. I've tried some things with eslint-plugin-json and jshint-json but to no avail. This tool, grunt-wslint comes closest to what I think we want. Unfortunately it is a Grunt plugin 😞 I personally feel a bit weird adding a Also, I want to add to this that we might consider adding some kind of linting that checks if the icon SVGs do not have a trailing newline. |
Update, it seems it is possible to achieve what we want using editorconfig-checker in which case we have to add an I'm currently considering the following EditorConfig configuration. This should correctly lint the
|
I'm trying to submit a PR with a new icon but Travis CI keeps rejecting it for having a newline at the end of the SVG. But I've deleted the newline and I'm still getting that error. Can this barrier be removed? At most this adds an additional byte or two to the size of the SVG file. There also seem to be build errors related to code which I've not touched:
|
This seems to be a common problem (mostly caused by editors - including GitHub's IDE - always adding a final newline by default, though installing EditorConfig for your editor would immediately solve that problem). Given the trouble it is causing contributors I'm fine with getting rid of the requirement 👍 The build error is peculiar, let's continue that discussion on the Pull Request itself. |
Update the JSON lint schema to check for formatting issues. This can include extraneous whitespace, improper indentation, etc.
The text was updated successfully, but these errors were encountered: