From 31177f1017d6cc31186c29f2aa66e430fc97b7d2 Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 17 Jul 2022 11:41:45 +0300 Subject: [PATCH] parserlib: fix custom-ident and use it more --- js/csslint/parserlib.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/js/csslint/parserlib.js b/js/csslint/parserlib.js index 1bb920a9..daea9ef8 100644 --- a/js/csslint/parserlib.js +++ b/js/csslint/parserlib.js @@ -39,7 +39,7 @@ self.parserlib = (() => { * @param {function} [alt] alternative check */ const customIdentChecker = (ex, re, alt) => (re = new RegExp(`^(?!(default|${ex ? ex + '|' : ''}${GlobalKeywords.join('|')})$)${re ? re.source : ''}`, 'i')) && - (p => p.tokenType === Tokens.IDENT && re.test(p.value) || (!alt || alt(p))); // eslint-disable-line no-use-before-define + (p => p.tokenType === Tokens.IDENT && re.test(p.value) || alt && alt(p)); // eslint-disable-line no-use-before-define const Properties = { 'accent-color': 'auto | ', @@ -55,7 +55,7 @@ self.parserlib = (() => { 'hanging | mathematical', 'animation': '[