1.0.10 • Published 4 months ago

jschema-validator v1.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

🧩 jschema-validator

Version License NPM Downloads Last commit Repo stars

jschema-validator is a CLI tool to validate JSON/JSONC/JSON5 files against JSON Schema in $schema field. Both URLs and local files are supported.

🛠️ Installation

bun add -d jschema-validator
npm install -D jschema-validator

via mise-en-place

mise use npm:jschema-validator

⚙️ Configuration

If you want to configure the Ajv options per file, you can create a jschema.config.ts file in the root of your project.
ts, js, mjs, cjs, mts, cts, json, jsonc, json5, yaml, yml, and toml config files are supported.

jschema.config.ts

import type { Config } from "jschema-validator";

const config: Config = {
	// configure Ajv options per file
	"test.json": {
		unicodeRegExp: false,
	},
	// set `false` to disable validation for a file
	"test2.json": false,
};
export default config;

Some files have predefined configurations. See src/config.ts.

💻 Development

Getting Started

Run the following commands to start development.

gh repo clone risu729/jschema-validator
cd jschema-validator
mise install

Commit

To commit, run the following command.
commitizen will ask you to fill in the commit message.

mise run commit
# or to commit only staged files
mise run commit:staged

Release

This package is released automatically by GitHub Actions using semantic-release.
package.json#version is not updated in git, but automatically updated and published to npm.

📜 License

MIT License

1.0.10

4 months ago

1.0.9

4 months ago

1.0.8

4 months ago

1.0.7

4 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

9 years ago