power-linter 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "power-linter",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "power-linter — пакет пресетов конфигураций для ESLint и Prettier, кастомных правил линтирования и скриптов.",
5
5
  "main": "src/index.js",
6
6
  "author": "vollmond148",
@@ -50,7 +50,7 @@ function buildCountsForExistedDataTests(rootNode) {
50
50
  const dataTestParts = dataTestValue.split("::"); // [existingDataTestID, encodedID, index]
51
51
  const groupedID = `${dataTestParts[0]}::${dataTestParts[1]}`;
52
52
  const index = Number(dataTestParts[2]) || 0;
53
- const prev = repeatedKeysCountsMap.get(groupedID) ?? 0;
53
+ const prev = repeatedKeysCountsMap.get(groupedID) || 0;
54
54
  if (index + 1 > prev) {
55
55
  repeatedKeysCountsMap.set(groupedID, index + 1);
56
56
  }
@@ -80,7 +80,7 @@ function applyDataTestIDsToDom(addedRootNode = document.body) {
80
80
  const fullHashChain = collectHashesByParentsTestIds(node);
81
81
  const encodedID = encodeStableId(fullHashChain);
82
82
  const groupedID = `${existingDataTestID}::${encodedID}`;
83
- const nextIndex = repeatedKeysCountsMap.get(groupedID) ?? 0;
83
+ const nextIndex = repeatedKeysCountsMap.get(groupedID) || 0;
84
84
  repeatedKeysCountsMap.set(groupedID, nextIndex + 1);
85
85
  const resultID = `${groupedID}::${nextIndex}`;
86
86
  node.setAttribute(STABLE_ID_ATTRIBUTE_NAME, resultID);