[Pkg-javascript-devel] Bug#1024691: eslint: Please update node-ajv dependency to version 8
Yadd
yadd at debian.org
Wed Nov 23 10:08:46 GMT 2022
Package: eslint
Version: 6.4.0~dfsg+~6.1.9-7
Severity: important
Tags: patch ftbfs
Hi,
I prepared node-ajv 8 in experimental branch and a patch for eslint.
There are remaining problems: some "throw" tests fail because error
strings changed.
Cheers,
Yadd
-------------- next part --------------
Description: fix for ajv >= 8
Author: Yadd <yadd at debian.org>
Forwarded: no
Last-Update: 2022-11-23
--- a/lib/shared/ajv.js
+++ b/lib/shared/ajv.js
@@ -9,7 +9,7 @@
//------------------------------------------------------------------------------
const Ajv = require("ajv"),
- metaSchema = require("ajv/lib/refs/json-schema-draft-04.json");
+ metaSchema = require("ajv/lib/refs/json-schema-draft-06.json");
//------------------------------------------------------------------------------
// Public Interface
@@ -17,6 +17,7 @@
module.exports = (additionalOptions = {}) => {
const ajv = new Ajv({
+ strict: false,
meta: false,
useDefaults: true,
validateSchema: false,
@@ -27,8 +28,7 @@
});
ajv.addMetaSchema(metaSchema);
- // eslint-disable-next-line no-underscore-dangle
- ajv._opts.defaultMeta = metaSchema.id;
+ ajv.opts.defaultMeta = metaSchema.id;
return ajv;
};
More information about the Pkg-javascript-devel
mailing list