Socket
Socket
Sign inDemoInstall

eslint-plugin-json-schema-validator

Package Overview
Dependencies
Maintainers
2
Versions
316
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-json-schema-validator - npm Package Compare versions

Comparing version 4.8.3 to 4.9.0

lib/configs/flat/base.d.ts

98

lib/index.d.ts

@@ -19,2 +19,100 @@ import type { RuleModule } from "./types";

};
"flat/base": ({
plugins: {
readonly "json-schema-validator": import("eslint").ESLint.Plugin;
};
files?: undefined;
languageOptions?: undefined;
rules?: undefined;
} | {
files: string[];
languageOptions: {
parser: typeof import("jsonc-eslint-parser");
};
rules: {
strict: string;
"no-unused-expressions": string;
"no-unused-vars": string;
"no-irregular-whitespace"?: undefined;
"spaced-comment"?: undefined;
};
plugins?: undefined;
} | {
files: string[];
languageOptions: {
parser: typeof import("yaml-eslint-parser");
};
rules: {
"no-irregular-whitespace": string;
"no-unused-vars": string;
"spaced-comment": string;
strict?: undefined;
"no-unused-expressions"?: undefined;
};
plugins?: undefined;
} | {
files: string[];
languageOptions: {
parser: typeof import("toml-eslint-parser");
};
rules: {
"no-irregular-whitespace": string;
"spaced-comment": string;
strict?: undefined;
"no-unused-expressions"?: undefined;
"no-unused-vars"?: undefined;
};
plugins?: undefined;
})[];
"flat/recommended": ({
plugins: {
readonly "json-schema-validator": import("eslint").ESLint.Plugin;
};
files?: undefined;
languageOptions?: undefined;
rules?: undefined;
} | {
files: string[];
languageOptions: {
parser: typeof import("jsonc-eslint-parser");
};
rules: {
strict: string;
"no-unused-expressions": string;
"no-unused-vars": string;
"no-irregular-whitespace"?: undefined;
"spaced-comment"?: undefined;
};
plugins?: undefined;
} | {
files: string[];
languageOptions: {
parser: typeof import("yaml-eslint-parser");
};
rules: {
"no-irregular-whitespace": string;
"no-unused-vars": string;
"spaced-comment": string;
strict?: undefined;
"no-unused-expressions"?: undefined;
};
plugins?: undefined;
} | {
files: string[];
languageOptions: {
parser: typeof import("toml-eslint-parser");
};
rules: {
"no-irregular-whitespace": string;
"spaced-comment": string;
strict?: undefined;
"no-unused-expressions"?: undefined;
"no-unused-vars"?: undefined;
};
plugins?: undefined;
} | {
rules: {
"json-schema-validator/no-invalid": string;
};
})[];
};

@@ -21,0 +119,0 @@ rules: {

4

lib/index.js

@@ -31,2 +31,4 @@ "use strict";

const recommended_1 = __importDefault(require("./configs/recommended"));
const base_2 = __importDefault(require("./configs/flat/base"));
const recommended_2 = __importDefault(require("./configs/flat/recommended"));
const meta = __importStar(require("./meta"));

@@ -36,2 +38,4 @@ const configs = {

recommended: recommended_1.default,
"flat/base": base_2.default,
"flat/recommended": recommended_2.default,
};

@@ -38,0 +42,0 @@ const rules = rules_1.rules.reduce((obj, r) => {

14

package.json
{
"name": "eslint-plugin-json-schema-validator",
"version": "4.8.3",
"version": "4.9.0",
"description": "ESLint plugin that validates data using JSON Schema Validator.",

@@ -56,3 +56,3 @@ "repository": "git+https://github.com/ota-meshi/eslint-plugin-json-schema-validator.git",

"debug": "^4.3.1",
"eslint-compat-utils": "^0.4.0",
"eslint-compat-utils": "^0.5.0",
"json-schema-migrate": "^2.0.0",

@@ -80,4 +80,4 @@ "jsonc-eslint-parser": "^2.0.0",

"@types/semver": "^7.3.1",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"env-cmd": "^10.1.0",

@@ -96,8 +96,8 @@ "esbuild-register": "^3.3.3",

"eslint-plugin-regexp": "^2.0.0",
"eslint-plugin-toml": "^0.9.0",
"eslint-plugin-toml": "^0.10.0",
"eslint-plugin-vue": "^9.0.0",
"eslint-plugin-yml": "^1.0.0",
"espree": "^9.0.0",
"espree": "^10.0.0",
"mocha": "^10.0.0",
"monaco-editor": "^0.45.0",
"monaco-editor": "^0.47.0",
"nyc": "^15.1.0",

@@ -104,0 +104,0 @@ "prettier": "^3.0.0",

@@ -46,4 +46,32 @@ # Introduction

Use `.eslintrc.*` file to configure rules. See also: [https://eslint.org/docs/user-guide/configuring](https://eslint.org/docs/user-guide/configuring).
#### New (ESLint>=v9) Config (Flat Config)
Use `eslint.config.js` file to configure rules. See also: <https://eslint.org/docs/latest/use/configure/configuration-files-new>.
Example **eslint.config.js**:
```mjs
import eslintPluginJsonSchemaValidator from 'eslint-plugin-json-schema-validator';
export default [
// add more generic rule sets here, such as:
// js.configs.recommended,
...eslintPluginJsonSchemaValidator.configs['flat/recommended'],
{
rules: {
// override/add rules settings here, such as:
// 'json-schema-validator/no-invalid': 'warn'
}
}
];
```
This plugin provides configs:
- `*.configs['flat/base']` ... Configuration to enable correct JSON, YAML and TOML parsing.
- `*.configs['flat/recommended']` ... Above, plus rule to validate with JSON Schema.
#### Legacy Config (ESLint<v9)
Use `.eslintrc.*` file to configure rules. See also: <https://eslint.org/docs/latest/use/configure/>.
Example **.eslintrc.js**:

@@ -50,0 +78,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc