File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 5454 "ajv" : " ^8.0.0" ,
5555 "debug" : " ^4.3.1" ,
5656 "eslint-compat-utils" : " ^0.6.0" ,
57+ "eslint-json-compat-utils" : " ^0.2.1" ,
5758 "json-schema-migrate" : " ^2.0.0" ,
5859 "jsonc-eslint-parser" : " ^2.0.0" ,
5960 "minimatch" : " ^8.0.0" ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import { compile } from "../utils/validator-factory";
2828import type { SchemaObject } from "../utils/types" ;
2929import fs from "fs" ;
3030import { getCwd , getFilename , getSourceCode } from "../utils/compat" ;
31+ import { toCompatCreate } from "eslint-json-compat-utils" ;
3132
3233const CATALOG_URL = "https://www.schemastore.org/api/json/catalog.json" ;
3334
@@ -162,7 +163,7 @@ export default createRule("no-invalid", {
162163 messages : { } ,
163164 type : "suggestion" ,
164165 } ,
165- create ( context , { filename } ) {
166+ create : toCompatCreate ( ( context , { filename } ) => {
166167 const sourceCode = getSourceCode ( context ) ;
167168 const cwd = getCwd ( context ) ;
168169 const relativeFilename = filename . startsWith ( cwd )
@@ -560,7 +561,7 @@ export default createRule("no-invalid", {
560561 } ,
561562 } ;
562563 }
563- } ,
564+ } ) ,
564565} ) ;
565566
566567/**
You can’t perform that action at this time.
0 commit comments