@html-eslint/eslint-plugin
Advanced tools
Comparing version 0.21.0 to 0.22.0
@@ -19,2 +19,3 @@ const { RULE_CATEGORY } = require("../constants"); | ||
KEBAB_CASE: "kebab-case", | ||
REGEX: "regex", | ||
}; | ||
@@ -47,2 +48,9 @@ | ||
}, | ||
{ | ||
type: "object", | ||
properties: { | ||
pattern: { type: "string" }, | ||
}, | ||
additionalProperties: false, | ||
}, | ||
], | ||
@@ -61,3 +69,7 @@ messages: { | ||
const checkNaming = CONVENTION_CHECKERS[convention]; | ||
const checkNaming = | ||
convention === CONVENTIONS.REGEX | ||
? (/** @type string */ name) => | ||
new RegExp(context.options[1].pattern).test(name) | ||
: CONVENTION_CHECKERS[convention]; | ||
@@ -64,0 +76,0 @@ return { |
{ | ||
"name": "@html-eslint/eslint-plugin", | ||
"version": "0.21.0", | ||
"version": "0.22.0", | ||
"description": "ESLint plugin for html", | ||
@@ -44,3 +44,3 @@ "author": "yeonjuan", | ||
"devDependencies": { | ||
"@html-eslint/parser": "^0.21.0", | ||
"@html-eslint/parser": "^0.22.0", | ||
"@types/eslint": "^7.2.10", | ||
@@ -51,3 +51,3 @@ "@types/estree": "^0.0.47", | ||
}, | ||
"gitHead": "494441cc7bef7b56ece42b07406c0b2f0ee01d59" | ||
"gitHead": "56a3c7726aa4d89f81035a3e3ea37bdd02be94ac" | ||
} |
98228
3527