Skip to content

codelicia/jsoncs

This branch is 1 commit ahead of, 2 commits behind master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2d3e42f · Sep 18, 2024
Feb 23, 2024
Sep 14, 2024
Nov 9, 2020
Aug 23, 2019
Aug 29, 2019
Aug 22, 2019
Nov 9, 2020
Aug 22, 2019
Sep 18, 2024
Sep 18, 2024
Dec 20, 2022

Repository files navigation

JSON Code Style

NPM Version

Command line interface

Install jsoncs with npm to use the command line interface:

npm install @codelicia/jsoncs --save-dev

Verify if the code style is fine:

./node_modules/.bin/jsoncs 'my/file.json'

or to multiple files

./node_modules/.bin/jsoncs 'my/*.json'

Fix the code style of a file or multiple files:

./node_modules/.bin/jsoncs --fix 'my/directory/*'

Options

$ jsoncs -h

Usage: jsoncs [file]

Options:
   -f, --fix                fix json file
   -q, --quiet              quiet mode
   -v, --version            json code style version
   -s, --spaces <integer>   quantity of spaces to indent the json (default: 2)

Example

  • RED: wrong json
  • BLUE: correct json