npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jsonlint-cli

v1.0.1

Published

cli wrapper for jsonlint

Downloads

39,324

Readme

jsonlint-cli

jsonlint-cli logo

jsonlint-cli - cli wrapper for jsonlint

Thin wrapper around jsonlint improving on its cli. It introduces glob expansion and advanced schema validation. Borrows heavily from jsonlint in every regard.

Feature comparison

jsonlint-cli introduces valuable improvements and additions to the cli shipping with jsonlint.

|Feature |jsonlint |jsonlint-cli |Description | |------------------------|:----------------:|:----------------:|:-----------------------------------------------| |json validity checking |:heavy_check_mark:|:heavy_check_mark:|jsonlint-cli uses jsonlint to parse and validate| |local schema validation |:heavy_check_mark:|:heavy_check_mark:|specify local schemas to validate input against | |read from stdin |:heavy_check_mark:|:heavy_check_mark:|stream json in via stdin | |read from fs |:heavy_check_mark:|:heavy_check_mark:|specify file's path to lint | |glob expansion |:x: |:heavy_check_mark:|specify globs of files to lint, e.g. **/*.json| |remote schema validation|:x: |:heavy_check_mark:|specify remote schemas to validate against | |v4 schema validation |:x: |:heavy_check_mark:|use v4 jsonschema | |config files |:x: |:heavy_check_mark:|support for eslint style config files |

Installation

# Install it from npm
npm install -g jsonlint-cli

Usage

jsonlint-cli exposes a command line interface

❯ jsonlint-cli --help
  [email protected] - cli wrapper for jsonlint

  [input] reads from stdin if [files] are omitted
  --ignore,-i     glob pattern to exclude from linting, defaults to: node_modules
  --validate,-s   uri to schema to use for validation, defaults to:
  --indent,-w     whitespace to use for pretty printing, defaults to: "  "
  --env,-e        json schema env to use for validation, defaults to: json-schema-draft-04
  --pretty,-p     pretty-print the input, defaults to: false
  --sort,-t       sort json keys alphabetically, defaults to: false
  --version,-v    print the version
  --help,-h       show this help

Configuration

jsonlint-cli picks up configuration files, searching upwards from process.cwd() or the file path if specified.

.jsonlintrc

{
  "validate": "", // schema uri to validate agains
  "ignore": ["node_modules/**/*"], // glob patterns to ignore
  "indent": "", // indent to use for pretty-printed output
  "env": "json-schema-draft-04", // json schema env version to use
  "pretty": true // pretty-print formatted json if quiet is false
}

.jsonlintignore

node_modules/ # ignored by default
distribution/

Copyright 2016 by Mario Nebl and contributors. Released under the MIT license.