Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@cldmv/prettier-plugin-jsonv

npm version npm downloads GitHub downloads Last commit npm last update

Contributors Sponsor shinrai

A Prettier plugin for formatting JSONV files.

Features

  • Formats .jsonv files using the @cldmv/jsonv parser
  • Supports all ES2015-2025 features (JSON5, binary/octal literals, BigInt, numeric separators, etc.)
  • Configurable year-based feature detection
  • Proper handling of comments and whitespace
  • Integrates with Prettier's configuration system

Installation

npm install --save-dev @cldmv/prettier-plugin-jsonv prettier @cldmv/jsonv

Usage

Add the plugin to your Prettier configuration:

Using .prettierrc.mjs or prettier.config.mjs:

import jsonv from 'prettier-plugin-jsonv';

export default {
  plugins: [jsonv],
  overrides: [
    {
      files: "*.jsonv",
      options: {
        jsonvYear: 2025,
        strictBigInt: false
      }
    }
  ]
};

Using .prettierrc or prettier.config.js:

module.exports = {
  plugins: ['prettier-plugin-jsonv'],
  overrides: [
    {
      files: "*.jsonv",
      options: {
        jsonvYear: 2025,
        strictBigInt: false
      }
    }
  ]
};

Configuration Options

Option Type Default Description
jsonvYear number 2025 The year to use for JSONV features (2015-2025)
strictBigInt boolean false Whether to enforce strict BigInt parsing

License

GitHub license npm license

Apache-2.0 © Shinrai / CLDMV

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages