This package provides a flycheck checker for json-mode using jsonlint from demjson.
The built in JSON checker uses zaach/jsonlint which has no rules support, but jsonlint from demjson has a set of options let you control which checks are to be performed, e.g. trailing-comma is allowed in .eslintrc but forbidden in package.json.
-
Uninstall zaach/jsonlint if necessary to avoid conflicts:
npm -g uninstall jsonlint
-
Install demjson, more info at installing-demjson:
pip install demjson
oreasy_install demjson
-
Install flycheck-demjsonlint which is available from :
M-x package-install [RET] flycheck-demjsonlint [RET]
.
(require 'flycheck-demjsonlint)
- Built-in support: .eslintrc, package.json
- Precedence: ~/.demjsonrc over pkg-dir/.demjsonrc
- Format: one record per line,
filename=jsonlint-cmd-options
, e.g..eslintrc=-S
- Implementation: demjsonlint is just a wrapper of jsonlint from demjson, jsonlint-cmd-options is passed to jsonlint as is