eslint-plugin-smarthr 0.5.4 → 0.5.5

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.5.5](https://github.com/kufu/eslint-plugin-smarthr/compare/v0.5.4...v0.5.5) (2024-03-29)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * a11y-heading-in-sectioning-contentでHeadingコンポーネントにtag属性を変数で設定した場合、jsエラーが起きるバグを修正 ([#130](https://github.com/kufu/eslint-plugin-smarthr/issues/130)) ([f927ecd](https://github.com/kufu/eslint-plugin-smarthr/commit/f927ecd80245f6976de9b561c07229cf3038f121))
11
+
5
12
  ### [0.5.4](https://github.com/kufu/eslint-plugin-smarthr/compare/v0.5.3...v0.5.4) (2024-03-29)
6
13
 
7
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-smarthr",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "author": "SmartHR",
5
5
  "license": "MIT",
6
6
  "description": "A sharable ESLint plugin for SmartHR",
@@ -193,7 +193,7 @@ const searchChildren = (n) => {
193
193
  } else if (
194
194
  (
195
195
  headingRegex.test(name) &&
196
- !n.openingElement.attributes.find(findTagAttr)?.value.value.match(noHeadingTagNamesRegex)
196
+ !n.openingElement.attributes.find(findTagAttr)?.value.value?.match(noHeadingTagNamesRegex)
197
197
  ) ||
198
198
  forInSearchChildren(n.openingElement.attributes)
199
199
  ) {
@@ -253,7 +253,7 @@ module.exports = {
253
253
  } else if (headingRegex.test(elementName)) {
254
254
  const tagAttr = node.attributes.find(findTagAttr)
255
255
 
256
- if (!tagAttr?.value.value.match(noHeadingTagNamesRegex)) {
256
+ if (!tagAttr?.value.value?.match(noHeadingTagNamesRegex)) {
257
257
  const result = searchBubbleUp(node.parent)
258
258
  let hit = false
259
259