liup a01a5aa773 | 3週間前 | |
---|---|---|
.. | ||
dist | 3週間前 | |
LICENSE | 3週間前 | |
README.md | 3週間前 | |
package.json | 3週間前 |
A utility that converts rules made for checking the AST of jsonc-eslint-parser
into rules compatible with @eslint/json
.
npm install eslint-json-compat-utils
import { toCompatRule } from "eslint-json-compat-utils";
export default toCompatRule({
meta: { /* ... */ },
create(context) {
return {
JSONArrayExpression: check,
};
},
})
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.
toCompatCreate(create)
Converts a create
function for jsonc-eslint-parser
into a create
function for @eslint/json
compatible.