eslint-plugin-smarthr 0.3.25 → 0.3.26
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.3.26](https://github.com/kufu/eslint-plugin-smarthr/compare/v0.3.25...v0.3.26) (2024-01-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* a11y-prohibit-useless-sectioning-fragmentの属性チェックのバグを修正 ([#107](https://github.com/kufu/eslint-plugin-smarthr/issues/107)) ([b42bdd9](https://github.com/kufu/eslint-plugin-smarthr/commit/b42bdd9e11258a6a32e13647c0c764065b5bac64))
|
|
11
|
+
|
|
5
12
|
### [0.3.25](https://github.com/kufu/eslint-plugin-smarthr/compare/v0.3.24...v0.3.25) (2024-01-23)
|
|
6
13
|
|
|
7
14
|
|
package/package.json
CHANGED
|
@@ -19,12 +19,12 @@ const SECTIONING_FRAGMENT_REGEX = /^SectioningFragment$/
|
|
|
19
19
|
const LAYOUT_REGEX = /((C(ent|lust)er)|Reel|Sidebar|Stack)$/
|
|
20
20
|
const AS_REGEX = /^(as|forwardedAs)$/
|
|
21
21
|
|
|
22
|
-
const includeSectioningAsAttr = (a) => a.name?.name
|
|
22
|
+
const includeSectioningAsAttr = (a) => a.name?.name?.match(AS_REGEX) && a.value.value?.match(BARE_SECTIONING_TAG_REGEX)
|
|
23
23
|
|
|
24
24
|
const searchSectioningFragment = (node) => {
|
|
25
25
|
switch (node.type) {
|
|
26
26
|
case 'JSXElement':
|
|
27
|
-
return node.openingElement.name?.name
|
|
27
|
+
return node.openingElement.name?.name?.match(SECTIONING_FRAGMENT_REGEX) ? node.openingElement : null
|
|
28
28
|
case 'Program':
|
|
29
29
|
return null
|
|
30
30
|
}
|