eslint-plugin-json-schema-validator
Advanced tools
Comparing version 4.7.3 to 4.7.4
@@ -0,1 +1,2 @@ | ||
/// <reference types="vue-eslint-parser" /> | ||
import type { JSONSchema4 } from "json-schema"; | ||
@@ -2,0 +3,0 @@ import type { Rule } from "eslint"; |
import type { CodeKeywordDefinition, DefinedError, ErrorObject, SchemaObject, ValidateFunction } from "ajv"; | ||
import type { RegExpEngine } from "ajv/dist/types"; | ||
import Ajv, { _, str } from "ajv"; | ||
export default Ajv; | ||
export { _, str }; | ||
export type { CodeKeywordDefinition, DefinedError, ErrorObject, SchemaObject, ValidateFunction, }; | ||
export type { CodeKeywordDefinition, DefinedError, ErrorObject, SchemaObject, ValidateFunction, RegExpEngine, }; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="vue-eslint-parser" /> | ||
import type { ESLintExpression } from "vue-eslint-parser/ast"; | ||
@@ -2,0 +3,0 @@ import type { RuleContext, SourceCode } from "../../../types"; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="vue-eslint-parser" /> | ||
import type { ESLintProperty, ESLintLiteral, ESLintTemplateLiteral, ESLintMemberExpression, ESLintIdentifier, ESLintNode, ESLintExpression } from "vue-eslint-parser/ast"; | ||
@@ -2,0 +3,0 @@ import type { RuleContext } from "../../../types"; |
@@ -11,2 +11,16 @@ "use strict"; | ||
const schema_1 = require("./schema"); | ||
const lazyRegExpEngine = (str, flags) => { | ||
let error; | ||
try { | ||
return new RegExp(str, flags); | ||
} | ||
catch (e) { | ||
error = e; | ||
} | ||
if (flags.includes("u")) { | ||
return new RegExp(str, flags.replace("u", "")); | ||
} | ||
throw error; | ||
}; | ||
lazyRegExpEngine.code = "new RegExp"; | ||
const ajv = new ajv_1.default({ | ||
@@ -18,2 +32,5 @@ allErrors: true, | ||
strict: false, | ||
code: { | ||
regExp: lazyRegExpEngine, | ||
}, | ||
}); | ||
@@ -54,2 +71,3 @@ ajv.addMetaSchema(require("ajv/lib/refs/json-schema-draft-06.json")); | ||
} | ||
console.error(schemaPath); | ||
throw e; | ||
@@ -56,0 +74,0 @@ } |
{ | ||
"name": "eslint-plugin-json-schema-validator", | ||
"version": "4.7.3", | ||
"version": "4.7.4", | ||
"description": "ESLint plugin that validates data using JSON Schema Validator.", | ||
@@ -67,3 +67,3 @@ "repository": "git+https://github.com/ota-meshi/eslint-plugin-json-schema-validator.git", | ||
"@actions/core": "^1.2.6", | ||
"@changesets/changelog-github": "^0.4.6", | ||
"@changesets/changelog-github": "^0.5.0", | ||
"@changesets/cli": "^2.24.2", | ||
@@ -100,3 +100,3 @@ "@ota-meshi/eslint-plugin": "^0.15.0", | ||
"mocha": "^10.0.0", | ||
"monaco-editor": "^0.44.0", | ||
"monaco-editor": "^0.45.0", | ||
"nyc": "^15.1.0", | ||
@@ -103,0 +103,0 @@ "prettier": "^3.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
108456
2486