prantlf / jsonlint

JSON/CJSON/JSON5 parser, syntax & schema validator and pretty-printer with a command-line client, written in pure JavaScript.
http://prantlf.github.io/jsonlint/
MIT License
38 stars 9 forks source link

Support config file #9

Closed daniel-shuy closed 2 years ago

daniel-shuy commented 4 years ago

Thanks for forking and continuing to maintain/enhance zaach/jsonlint, I really hope this becomes the official fork.

I would like to request for this to support config files (eg. .jsonlintrc.yml). That would then allow this to be used by tools such as github/super-linter, which currently uses zaach/jsonlint, which is not configurable (see https://github.com/github/super-linter#user-content-template-rules-files).

prantlf commented 2 years ago

Interesting! Who would think that a configuration file would be useful for linting such a simple language like JSON ;-) Yes, supporting js, json and yml config files and a config object in package.json woudl be a nice addition to the configurability.

prantlf commented 2 years ago

I added the support for configuration files using cosmiconfig to 11.3.0. It recognizes .jsonlintrc.yml too, among other places.