eslint-json-compat-utils
A utility that converts rules made for checking the AST of `jsonc-eslint-parser` into rules compatible with `@eslint/json`.
Last updated 9 months ago by GitHub Actions .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install eslint-json-compat-utils 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.2.3                                ...           latest (9 months ago)

8 Versions

  • 0.2.3                                ...           9 months ago
  • 0.2.2                                ...           9 months ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Total 14
Today 0
This Week 0
This Month 8
Last Day 0
Last Week 8
Last Month 0
Dependencies (1)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE