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

Disable the json linter #8077

Merged
merged 1 commit into from
Oct 28, 2020
Merged

Disable the json linter #8077

merged 1 commit into from
Oct 28, 2020

Conversation

zadjii-msft
Copy link
Member

All our JSON files are actually JSONC files - json with comments.

A well-behaved application that accepts JSON should accept and ignore comments. However, jsonlint is not a well behaved application in this regard.

So, to prevent the linter from complaining about our JSON comments, we need to disable it entirely. THAT'S RIGHT, there's not a setting to allow JSONC.

See #8076 as an example of this working.

This will also unblock #7462.

@zadjii-msft zadjii-msft added Area-Build Issues pertaining to the build system, CI, infrastructure, meta Product-Meta The product is the management of the products. labels Oct 28, 2020
@DHowett DHowett merged commit 1c97d20 into main Oct 28, 2020
@DHowett DHowett deleted the dev/migrie/sad-linter-noises branch October 28, 2020 17:46
@WSLUser
Copy link
Contributor

WSLUser commented Oct 28, 2020

So actually in this case, i think we need to add our own linter rules. If you see https://www.npmjs.com/package/eslint-plugin-json-format, this is what VSCode uses to lint jsonc files. We just need to update the plugin field. This will ignore the comments and simply lint the actual json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Build Issues pertaining to the build system, CI, infrastructure, meta Product-Meta The product is the management of the products.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants