fix: rules

This commit is contained in:
Gabe Yuan
2024-03-17 11:35:43 +08:00
parent 14b5ba9c4c
commit 61ef5df559
2 changed files with 10 additions and 27 deletions

View File

@@ -271,29 +271,8 @@ const RULES_MAP = {
export const BUILTIN_RULES = Object.entries(RULES_MAP)
.sort((a, b) => a[0].localeCompare(b[0]))
.map(
([
pattern,
{
selector,
keepSelector = "",
terms = "",
selectStyle = "",
parentStyle = "",
injectCss = "",
fixerSelector = "",
fixerFunc = GLOBAL_KEY,
},
]) => ({
...DEFAULT_RULE,
pattern,
selector,
keepSelector,
terms,
selectStyle,
parentStyle,
injectCss,
fixerSelector,
fixerFunc,
})
);
.map(([pattern, rule]) => ({
...DEFAULT_RULE,
...rule,
pattern,
}));