Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Reintroduce json linting? #18

Closed
kitch opened this issue Jun 2, 2014 · 7 comments
Closed

Reintroduce json linting? #18

kitch opened this issue Jun 2, 2014 · 7 comments

Comments

@kitch
Copy link
Contributor

kitch commented Jun 2, 2014

Looks like steelbrain/linter#39 was caused by steelbrain/linter#67 and not by using jshint to lint json with the react editor. Thoughts on bringing it back?

@iam4x
Copy link
Member

iam4x commented Jun 2, 2014

@JakeKIT Nope, json shouldn't be linted with jshint.

But with https://github.com/zaach/jsonlint ;) I'll do a json-linter soon.

@hd-deman
Copy link
Member

hd-deman commented Jun 3, 2014

@hd-deman
Copy link
Member

hd-deman commented Jun 3, 2014

@JakeKIT did you see it? #17

@abejfehr
Copy link

I think this is weird behaviour. jshint in our gulpfile lints json files, and I installed this package specifically so I could find all the problems before it got that far. Why doesn't linter-jshint just do what jshint does, instead of deciding for jshint what it should and shouldn't do

@Arcanemagus
Copy link
Member

Why doesn't linter-jshint just do what jshint does, instead of deciding for jshint what it should and shouldn't do

Because JSHint doesn't actually say that it lints JSON, so this package doesn't make it do so. If you want JSON linting you should install a JSON lint provider such as linter-jsonlint. The "JSON linting" that is done by JSHint is actually just a wrapper around an old version of that anyway, and as far as I knew only happened on package.json files.

@abejfehr
Copy link

abejfehr commented May 18, 2017

It's true that it's not advertised as a feature for jshint, but I found it jarring that their behaviours are different. I've installed linter-jsonlint now, but my opinion is still that this package should match jshint.

The file that was linted by jshint for me was a not a package.json file, so it seems like they lint more than just those.

@Arcanemagus
Copy link
Member

As JSHint doesn't advertize support for that I'm not enabling it. JSHint is buggy enough linting just JS code I don't really want to deal with issues from it linting JSON when they don't even officially support it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants