ocrmnav
Version:
DevStack - The Complete Developer Toolkit - Virtual file system, workflow automation, and more than 65+ other development tools / features in one seamless extension. Cutting down dev times never before seen.
814 lines (629 loc) • 23.8 kB
JavaScript
exports.id = 21;
exports.ids = [21];
exports.modules = {
/***/ 1519:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ atRuleAfterIndex: () => (/* binding */ atRuleAfterIndex),
/* harmony export */ atRuleAfterNameIndex: () => (/* binding */ atRuleAfterNameIndex),
/* harmony export */ atRuleBetweenIndex: () => (/* binding */ atRuleBetweenIndex),
/* harmony export */ atRuleParamIndex: () => (/* binding */ atRuleParamIndex),
/* harmony export */ declarationBetweenIndex: () => (/* binding */ declarationBetweenIndex),
/* harmony export */ declarationValueIndex: () => (/* binding */ declarationValueIndex),
/* harmony export */ ruleAfterIndex: () => (/* binding */ ruleAfterIndex),
/* harmony export */ ruleBetweenIndex: () => (/* binding */ ruleBetweenIndex)
/* harmony export */ });
/* harmony import */ var _getAtRuleParams_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1520);
/* harmony import */ var _getRuleSelector_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1521);
/* harmony import */ var _validateTypes_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(579);
/** @import {AtRule, Declaration, Rule} from 'postcss' */
/**
* @param {AtRule} atRule
* @returns {number}
*/
function atRuleParamIndex(atRule) {
const index = atRuleAfterNameIndex(atRule);
return index + (atRule.raws.afterName?.length ?? 0);
}
/**
* @param {AtRule} atRule
* @returns {number}
*/
function atRuleAfterIndex(atRule) {
// subtract 1 for `}`
const endOffset = atRule.source?.end?.offset;
if (!endOffset) return atRule.toString().length - 1;
const afterLength = atRule.raws?.after?.length;
if (!afterLength) return endOffset - 1;
return endOffset - (afterLength + 1);
}
/**
* @param {AtRule} atRule
* @returns {number}
*/
function atRuleAfterNameIndex(atRule) {
// Initial 1 is for the `@`
return 1 + atRule.name.length;
}
/**
* @param {AtRule} atRule
* @returns {number}
*/
function atRuleBetweenIndex(atRule) {
return atRuleParamIndex(atRule) + (0,_getAtRuleParams_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(atRule).length;
}
/**
* @param {Declaration} decl
* @returns {number}
*/
function declarationBetweenIndex(decl) {
const { prop } = decl.raws;
const propIsObject = (0,_validateTypes_mjs__WEBPACK_IMPORTED_MODULE_2__.isObject)(prop);
return countChars([
propIsObject && 'prefix' in prop && prop.prefix,
(propIsObject && 'raw' in prop && prop.raw) || decl.prop,
propIsObject && 'suffix' in prop && prop.suffix,
]);
}
/**
* Get the index of a declaration's value
*
* @param {Declaration} decl
* @returns {number}
*/
function declarationValueIndex(decl) {
const { between, value } = decl.raws;
return (
declarationBetweenIndex(decl) +
countChars([between || ':', value && 'prefix' in value && value.prefix])
);
}
/**
* @param {Rule} rule
* @returns {number}
*/
function ruleBetweenIndex(rule) {
return (0,_getRuleSelector_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(rule).length;
}
/**
* @param {Rule} rule
* @returns {number}
*/
function ruleAfterIndex(rule) {
// subtract 1 for `}`
const endOffset = rule.source?.end?.offset;
if (!endOffset) return rule.toString().length - 1;
const afterLength = rule.raws?.after?.length;
if (!afterLength) return endOffset - 1;
return endOffset - (afterLength + 1);
}
/**
* @param {unknown[]} values
* @returns {number}
*/
function countChars(values) {
return values.reduce((/** @type {number} */ count, value) => {
if ((0,_validateTypes_mjs__WEBPACK_IMPORTED_MODULE_2__.isString)(value)) return count + value.length;
return count;
}, 0);
}
/***/ }),
/***/ 1520:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ getAtRuleParams)
/* harmony export */ });
/**
* @param {import('postcss').AtRule} atRule
* @returns {string}
*/
function getAtRuleParams(atRule) {
return atRule.raws.params?.raw ?? atRule.params;
}
/***/ }),
/***/ 1521:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ getRuleSelector)
/* harmony export */ });
/**
* @param {import('postcss').Rule} ruleNode
* @returns {string}
*/
function getRuleSelector(ruleNode) {
const raws = ruleNode.raws;
return (raws.selector && raws.selector.raw) || ruleNode.selector;
}
/***/ }),
/***/ 1522:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ getDeclarationValue)
/* harmony export */ });
/**
* @param {import('postcss').Declaration} decl
* @returns {string}
*/
function getDeclarationValue(decl) {
const raws = decl.raws;
return (raws.value && raws.value.raw) || decl.value;
}
/***/ }),
/***/ 1523:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ isStandardSyntaxValue)
/* harmony export */ });
/* harmony import */ var _hasInterpolation_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1524);
/**
* Check whether a value is standard
*
* @param {string} value
* @returns {boolean}
*/
function isStandardSyntaxValue(value) {
let normalizedValue = value;
// Ignore operators before variables (example -$variable)
if (/^[-+*/]/.test(value.charAt(0))) {
normalizedValue = normalizedValue.slice(1);
}
// SCSS variable (example $variable)
// styled component interpolation (example ${foo => foo.bar})
if (normalizedValue.startsWith('$')) {
return false;
}
// SCSS namespace (example namespace.$variable)
if (/^.+\.\$/.test(value)) {
return false;
}
// SCSS namespace (example namespace.function-name())
if (/^.+\.[-\w]+\(/.test(value)) {
return false;
}
// Less variable
if (normalizedValue.startsWith('@')) {
return false;
}
// SCSS or Less interpolation
if ((0,_hasInterpolation_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(normalizedValue)) {
return false;
}
// WebExtension replacement keyword used by Chrome/Firefox
// more information: https://developer.chrome.com/extensions/i18n
// and https://github.com/stylelint/stylelint/issues/4707
if (/__MSG_\S+__/.test(value)) {
return false;
}
return true;
}
/***/ }),
/***/ 1524:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ hasInterpolation)
/* harmony export */ });
/* harmony import */ var _hasLessInterpolation_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1525);
/* harmony import */ var _hasPsvInterpolation_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1526);
/* harmony import */ var _hasScssInterpolation_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1527);
/* harmony import */ var _hasTplInterpolation_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1528);
/**
* Check whether a string has interpolation
*
* @param {string} string
* @returns {boolean} If `true`, a string has interpolation
*/
function hasInterpolation(string) {
// SCSS or Less interpolation
if (
(0,_hasLessInterpolation_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(string) ||
(0,_hasScssInterpolation_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(string) ||
(0,_hasTplInterpolation_mjs__WEBPACK_IMPORTED_MODULE_3__["default"])(string) ||
(0,_hasPsvInterpolation_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(string)
) {
return true;
}
return false;
}
/***/ }),
/***/ 1525:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ hasLessInterpolation)
/* harmony export */ });
const HAS_LESS_INTERPOLATION = /@\{.+?\}/;
/**
* Check whether a string has less interpolation
*
* @param {string} string
* @returns {boolean} If `true`, a string has less interpolation
*/
function hasLessInterpolation(string) {
return HAS_LESS_INTERPOLATION.test(string);
}
/***/ }),
/***/ 1526:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ hasPsvInterpolation)
/* harmony export */ });
const HAS_PSV_INTERPOLATION = /\$\(.+?\)/;
/**
* Check whether a string has postcss-simple-vars interpolation
*
* @param {string} string
* @returns {boolean}
*/
function hasPsvInterpolation(string) {
return HAS_PSV_INTERPOLATION.test(string);
}
/***/ }),
/***/ 1527:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ hasScssInterpolation)
/* harmony export */ });
const HAS_SCSS_INTERPOLATION = /#\{.+?\}/s;
/**
* Check whether a string has scss interpolation
*
* @param {string} string
* @returns {boolean}
*/
function hasScssInterpolation(string) {
return HAS_SCSS_INTERPOLATION.test(string);
}
/***/ }),
/***/ 1528:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ hasTplInterpolation)
/* harmony export */ });
const HAS_TPL_INTERPOLATION = /\{.+?\}/s;
/**
* Check whether a string has JS template literal interpolation or HTML-like template
*
* @param {string} string
* @returns {boolean} If `true`, a string has template literal interpolation
*/
function hasTplInterpolation(string) {
return HAS_TPL_INTERPOLATION.test(string);
}
/***/ }),
/***/ 1626:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ getDimension)
/* harmony export */ });
/* harmony import */ var postcss_value_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1514);
/* harmony import */ var _blurInterpolation_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1627);
/* harmony import */ var _isStandardSyntaxValue_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1523);
/**
* Get Dimension from value node;
* `unit` and `number` return null if neither is found
*
* @param {import('postcss-value-parser').Node} node
*
* @returns {{unit: null, number: null} | valueParser.Dimension}
*/
function getDimension(node) {
if (!node || !node.value) {
return {
unit: null,
number: null,
};
}
// Ignore non-word nodes
if (node.type !== 'word') {
return {
unit: null,
number: null,
};
}
// Ignore non standard syntax
if (!(0,_isStandardSyntaxValue_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(node.value)) {
return {
unit: null,
number: null,
};
}
// Ignore HEX
if (node.value.startsWith('#')) {
return {
unit: null,
number: null,
};
}
// Remove non standard stuff
const value = (0,_blurInterpolation_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(node.value, '')
// ignore hack unit
.replace('\\0', '')
.replace('\\9', '');
const parsedUnit = postcss_value_parser__WEBPACK_IMPORTED_MODULE_0__.unit(value);
if (!parsedUnit) {
return {
unit: null,
number: null,
};
}
return parsedUnit;
}
/***/ }),
/***/ 1627:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ blurInterpolation)
/* harmony export */ });
/**
* @param {string} source
* @param {string} [blurChar]
* @returns {string}
*/
function blurInterpolation(source, blurChar = ' ') {
return source.replace(/[#@{}]+/g, blurChar);
}
/***/ }),
/***/ 1818:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var postcss_value_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1514);
/* harmony import */ var _reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1591);
/* harmony import */ var _utils_validateTypes_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(579);
/* harmony import */ var _utils_nodeFieldIndices_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1519);
/* harmony import */ var _utils_getDeclarationValue_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1522);
/* harmony import */ var _utils_getDimension_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1626);
/* harmony import */ var _utils_isCounterIncrementCustomIdentValue_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1819);
/* harmony import */ var _utils_isCounterResetCustomIdentValue_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1820);
/* harmony import */ var _utils_isStandardSyntaxValue_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1523);
/* harmony import */ var _utils_optionsMatches_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(869);
/* harmony import */ var _utils_report_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(945);
/* harmony import */ var _utils_ruleMessages_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(950);
/* harmony import */ var _utils_validateOptions_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(873);
const ruleName = 'value-keyword-case';
const messages = (0,_utils_ruleMessages_mjs__WEBPACK_IMPORTED_MODULE_11__["default"])(ruleName, {
expected: (actual, expected) => `Expected "${actual}" to be "${expected}"`,
});
const meta = {
url: 'https://stylelint.io/user-guide/rules/value-keyword-case',
fixable: true,
};
// Operators are interpreted as "words" by the value parser, so we want to make sure to ignore them.
const ignoredCharacters = new Set(['+', '-', '/', '*', '%']);
const gridRowProps = new Set(['grid-row', 'grid-row-start', 'grid-row-end']);
const gridColumnProps = new Set(['grid-column', 'grid-column-start', 'grid-column-end']);
const mapLowercaseKeywordsToCamelCase = new Map();
for (const func of _reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.camelCaseKeywords) {
mapLowercaseKeywordsToCamelCase.set(func.toLowerCase(), func);
}
/** @type {import('stylelint').CoreRules[ruleName]} */
const rule = (primary, secondaryOptions) => {
return (root, result) => {
const validOptions = (0,_utils_validateOptions_mjs__WEBPACK_IMPORTED_MODULE_12__["default"])(
result,
ruleName,
{
actual: primary,
possible: ['lower', 'upper'],
},
{
actual: secondaryOptions,
possible: {
ignoreProperties: [_utils_validateTypes_mjs__WEBPACK_IMPORTED_MODULE_2__.isString, _utils_validateTypes_mjs__WEBPACK_IMPORTED_MODULE_2__.isRegExp],
ignoreKeywords: [_utils_validateTypes_mjs__WEBPACK_IMPORTED_MODULE_2__.isString, _utils_validateTypes_mjs__WEBPACK_IMPORTED_MODULE_2__.isRegExp],
ignoreFunctions: [_utils_validateTypes_mjs__WEBPACK_IMPORTED_MODULE_2__.isString, _utils_validateTypes_mjs__WEBPACK_IMPORTED_MODULE_2__.isRegExp],
camelCaseSvgKeywords: [_utils_validateTypes_mjs__WEBPACK_IMPORTED_MODULE_2__.isBoolean],
},
optional: true,
},
);
if (!validOptions) {
return;
}
root.walkDecls((decl) => {
const prop = decl.prop;
const propLowerCase = decl.prop.toLowerCase();
const value = decl.value;
if (!(0,_utils_isStandardSyntaxValue_mjs__WEBPACK_IMPORTED_MODULE_8__["default"])(value)) return;
const parsed = postcss_value_parser__WEBPACK_IMPORTED_MODULE_0__((0,_utils_getDeclarationValue_mjs__WEBPACK_IMPORTED_MODULE_4__["default"])(decl));
parsed.walk((node) => {
const keyword = node.value;
const valueLowerCase = keyword.toLowerCase();
// Ignore system colors
if (_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.systemColorsKeywords.has(valueLowerCase)) {
return;
}
// Ignore keywords within `url` and `var` function
if (
node.type === 'function' &&
(valueLowerCase === 'url' ||
valueLowerCase === 'var' ||
valueLowerCase === 'counter' ||
valueLowerCase === 'counters' ||
valueLowerCase === 'attr')
) {
return false;
}
// ignore keywords within ignoreFunctions functions
if (
node.type === 'function' &&
(0,_utils_optionsMatches_mjs__WEBPACK_IMPORTED_MODULE_9__["default"])(secondaryOptions, 'ignoreFunctions', keyword)
) {
return false;
}
const { unit } = (0,_utils_getDimension_mjs__WEBPACK_IMPORTED_MODULE_5__["default"])(node);
// Ignore css variables, and hex values, and math operators, and sass interpolation
if (
node.type !== 'word' ||
!(0,_utils_isStandardSyntaxValue_mjs__WEBPACK_IMPORTED_MODULE_8__["default"])(keyword) ||
value.includes('#') ||
ignoredCharacters.has(keyword) ||
unit
) {
return;
}
if (
propLowerCase === 'animation' &&
!_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.animationShorthandKeywords.has(valueLowerCase) &&
!_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.animationNameKeywords.has(valueLowerCase)
) {
return;
}
if (propLowerCase === 'animation-name' && !_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.animationNameKeywords.has(valueLowerCase)) {
return;
}
if (
propLowerCase === 'font' &&
!_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.fontShorthandKeywords.has(valueLowerCase) &&
!_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.fontFamilyKeywords.has(valueLowerCase)
) {
return;
}
if (propLowerCase === 'font-family' && !_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.fontFamilyKeywords.has(valueLowerCase)) {
return;
}
if (
propLowerCase === 'counter-increment' &&
(0,_utils_isCounterIncrementCustomIdentValue_mjs__WEBPACK_IMPORTED_MODULE_6__["default"])(valueLowerCase)
) {
return;
}
if (propLowerCase === 'counter-reset' && (0,_utils_isCounterResetCustomIdentValue_mjs__WEBPACK_IMPORTED_MODULE_7__["default"])(valueLowerCase)) {
return;
}
if (gridRowProps.has(propLowerCase) && !_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.gridRowKeywords.has(valueLowerCase)) {
return;
}
if (gridColumnProps.has(propLowerCase) && !_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.gridColumnKeywords.has(valueLowerCase)) {
return;
}
if (propLowerCase === 'grid-area' && !_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.gridAreaKeywords.has(valueLowerCase)) {
return;
}
if (
propLowerCase === 'list-style' &&
!_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.listStyleShorthandKeywords.has(valueLowerCase) &&
!_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.listStyleTypeKeywords.has(valueLowerCase)
) {
return;
}
if (propLowerCase === 'list-style-type' && !_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_1__.listStyleTypeKeywords.has(valueLowerCase)) {
return;
}
if ((0,_utils_optionsMatches_mjs__WEBPACK_IMPORTED_MODULE_9__["default"])(secondaryOptions, 'ignoreKeywords', keyword)) {
return;
}
if ((0,_utils_optionsMatches_mjs__WEBPACK_IMPORTED_MODULE_9__["default"])(secondaryOptions, 'ignoreProperties', prop)) {
return;
}
const keywordLowerCase = keyword.toLocaleLowerCase();
/** @type {string} */
let expectedKeyword;
/** @type {boolean} */
const camelCaseSvgKeywords =
(secondaryOptions && secondaryOptions.camelCaseSvgKeywords) || false;
if (
primary === 'lower' &&
mapLowercaseKeywordsToCamelCase.has(keywordLowerCase) &&
camelCaseSvgKeywords
) {
expectedKeyword = mapLowercaseKeywordsToCamelCase.get(keywordLowerCase);
} else if (primary === 'lower') {
expectedKeyword = keyword.toLowerCase();
} else {
expectedKeyword = keyword.toUpperCase();
}
if (keyword === expectedKeyword) {
return;
}
const index = (0,_utils_nodeFieldIndices_mjs__WEBPACK_IMPORTED_MODULE_3__.declarationValueIndex)(decl) + node.sourceIndex;
const endIndex = index + keyword.length;
const fix = () => {
node.value = expectedKeyword;
decl.value = parsed.toString();
};
(0,_utils_report_mjs__WEBPACK_IMPORTED_MODULE_10__["default"])({
message: messages.expected,
messageArgs: [keyword, expectedKeyword],
node: decl,
index,
endIndex,
result,
ruleName,
fix: {
apply: fix,
node: decl,
},
});
});
});
};
};
rule.ruleName = ruleName;
rule.messages = messages;
rule.meta = meta;
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rule);
/***/ }),
/***/ 1819:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ isCounterIncrementCustomIdentValue)
/* harmony export */ });
/* harmony import */ var _reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1591);
/**
* Check value is a custom ident
*
* @param {string} value
*/
function isCounterIncrementCustomIdentValue(value) {
const valueLowerCase = value.toLowerCase();
if (
_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_0__.counterIncrementKeywords.has(valueLowerCase) ||
Number.isFinite(Number.parseInt(valueLowerCase, 10))
) {
return false;
}
return true;
}
/***/ }),
/***/ 1820:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ isCounterResetCustomIdentValue)
/* harmony export */ });
/* harmony import */ var _reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1591);
/**
* Check value is a custom ident
*
* @param {string} value
*/
function isCounterResetCustomIdentValue(value) {
const valueLowerCase = value.toLowerCase();
if (
_reference_keywords_mjs__WEBPACK_IMPORTED_MODULE_0__.counterResetKeywords.has(valueLowerCase) ||
Number.isFinite(Number.parseInt(valueLowerCase, 10))
) {
return false;
}
return true;
}
/***/ })
};
;
//# sourceMappingURL=21.extension.js.map
;