Skip to content

Disable the json linter#8077

Merged
DHowett merged 1 commit intomainfrom
dev/migrie/sad-linter-noises
Oct 28, 2020
Merged

Disable the json linter#8077
DHowett merged 1 commit intomainfrom
dev/migrie/sad-linter-noises

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