Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

JSONCS - JSON Code Style

License

NotificationsYou must be signed in to change notification settings

codelicia/jsoncs

Repository files navigation

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 -hUsage: 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


[8]ページ先頭

©2009-2025 Movatter.jp