MES手机端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
liup a01a5aa773 提交修改 3 weeks ago
..
dist 提交修改 3 weeks ago
LICENSE 提交修改 3 weeks ago
README.md 提交修改 3 weeks ago
package.json 提交修改 3 weeks ago

README.md

eslint-json-compat-utils

A utility that converts rules made for checking the AST of jsonc-eslint-parser into rules compatible with @eslint/json.

Installation

npm install eslint-json-compat-utils

Usage

import { toCompatRule } from "eslint-json-compat-utils";

export default toCompatRule({
  meta: { /* ... */ },
  create(context) {
    return {
      JSONArrayExpression: check,
    };
  },
})

API

toCompatRule(rule)

Converts a rule object for jsonc-eslint-parser into a rule object for @eslint/json compatible.

toCompatPlugin(plugin)

Converts a plugin object for jsonc-eslint-parser into a plugin object for @eslint/json compatible.

Example

toCompatCreate(create)

Converts a create function for jsonc-eslint-parser into a create function for @eslint/json compatible.