import AJV from 'ajv';
const ajv = AJV();

function safeEscapeQuotes(str) {
  return str.replace(/\\([\s\S])|(')/g,"\\$1$2").replace(/\\([\s\S])|(")/g,"\\$1$2"); // escape only if not escaped already
}

ajv.addKeyword('deprecated', { inline: function (it, keyword, schema, parentSchema){
  var op = schema ? `console.warn('Property "${it.schemaPath.replace(/^\.properties\./, '')}" was deprecated on: ${schema.deprecatedOn}. Recommended alternative is: "${safeEscapeQuotes(schema.description)}".')` : '';
  return `${op} || 1`
}})

export default ajv
@@ -268,22 +268,8 @@
 hema
-, parentSchema
 )%7B%0A 
@@ -509,12 +509,14 @@
 %7C 1%60
+;
 %0A%7D%7D)
+;
 %0A%0Aex
@@ -527,12 +527,13 @@
  default ajv
+;

Make eslint happy