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

Two issues: Add Discussion to repo for Q&A and Does quick-lint-js lint json files? #1193

Open
jebarpg opened this issue Jan 24, 2024 · 2 comments
Assignees

Comments

@jebarpg
Copy link

jebarpg commented Jan 24, 2024

sorry not sure where to ask this question so I post it here. Does quick-lint-js lint json files as well? And to that extend is there a list of file types which quick-lint-js is capable of linting? i.e. *.js, *.ts, *.jsx, *.json, etc. It could be a good page to have documented somewhere if it isn't already... sorry had trouble finding it if there is something on this.

thanks for any help.

@strager
Copy link
Collaborator

strager commented Jan 25, 2024

Does quick-lint-js lint json files as well?

No. quick-lint-js does report issues in quick-lint-js.config files (which are JSON), but quick-lint-js does not have general-purpose JSON syntax checking. i.e. *.js, *.ts, *.jsx, *.json, etc.

And to that extend is there a list of file types which quick-lint-js is capable of linting?

CLI: https://quick-lint-js.com/cli/#language
LSP server: https://quick-lint-js.com/docs/lsp/#_document_languageid
Visual Studio Code extension: (undocumented)

sorry had trouble finding it if there is something on this.

Where did you look for this information? I certainly could improve the documentation with your feedback.

@strager strager self-assigned this Jan 25, 2024
@jebarpg
Copy link
Author

jebarpg commented Jan 25, 2024

Ah thank you. I was looking at the website for something that said "Language Support" or "Supported Language" I had looked through the CLI docs but totally missed the languageid section. And to my own ignorance I didn't think to look in LSP. I had thought maybe the languages would be listed on the home page with the nice comparison chart there as well. But most of this was due to my quick glassing over things.

O also I made a script in my package json to run quick-lint-js over all .ts and .js files and excluding some directories:
"find . -type d \( -path ./node_modules -o -path ./coverage -o -path ./dist \) -prune -o -type f \( -iname \.js -o -iname \.ts \) -print | xargs /usr/bin/quick-lint-js | xargs"

Not sure if there is a better way to do this... the ending xargs is to prevent the package.json script from showing errors when it actually succeeded. And I'm excluding looking through my node_modules, coverage and dist directories for files to lint.

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

No branches or pull requests

2 participants