How to get JSON linting to work (via eslint-plugin-json)


I would like linting for my json files. I installed eslint-plugin-json (globally), updated the eslintrc. file to reference the correct plugin, but eslint still do not parse json files. From the docs of eslint it seems this has to be done via the command line:

Currently the sole method for telling ESLint which file extensions to lint is by specifying a comma separated list of extensions using the --ext command line option.

So I guess I would need something like this: eslint --ext .json,.js

But how to establish this in cloud9?


The default linter in Cloud9 IDE uses a browser copy of eslint that does not support parsers or plug-ins in the way you might expect, I wrote this plugin to fix the issues I had been having personally and it supports eslint properly like if you were using the eslint cli which will work with your updated .eslintrc.


There are few tools online which may help to validate JSON data, such as