eslint-plugin-smarthr
Advanced tools
Comparing version 0.3.13 to 0.3.14
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.3.14](https://github.com/kufu/eslint-plugin-smarthr/compare/v0.3.13...v0.3.14) (2023-11-05) | ||
### Bug Fixes | ||
* styled-components/attrsメソッドを利用している場合、継承時の名称チェック対象外になっていたため修正 ([#89](https://github.com/kufu/eslint-plugin-smarthr/issues/89)) ([93b72f2](https://github.com/kufu/eslint-plugin-smarthr/commit/93b72f23f0bcc507976793c63955cff13313e79f)) | ||
### [0.3.13](https://github.com/kufu/eslint-plugin-smarthr/compare/v0.3.12...v0.3.13) (2023-10-16) | ||
@@ -7,0 +14,0 @@ |
@@ -57,2 +57,6 @@ const STYLED_COMPONENTS_METHOD = 'styled' | ||
break | ||
case callee.object?.callee?.name: | ||
const arg = callee.object.arguments[0] | ||
base = arg.name || arg.value | ||
break | ||
} | ||
@@ -59,0 +63,0 @@ } |
{ | ||
"name": "eslint-plugin-smarthr", | ||
"version": "0.3.13", | ||
"version": "0.3.14", | ||
"author": "SmartHR", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -41,2 +41,3 @@ const rule = require('../rules/a11y-heading-in-sectioning-content'); | ||
{ code: 'const FugaSection = styled(HogeSection)``' }, | ||
{ code: "const FugaHeading = styled(Heading).attrs(() => ({ type: 'blockTitle' }))``" }, | ||
{ code: '<PageHeading>hoge</PageHeading>' }, | ||
@@ -58,2 +59,3 @@ { code: '<Section><Heading>hoge</Heading></Section>' }, | ||
{ code: 'const Fuga = styled(HogeHeading)``', errors: [ { message: `Fugaを正規表現 "/Heading$/" がmatchする名称に変更してください` } ] }, | ||
{ code: 'const Fuga = styled(HogeHeading).attrs(() => ({ type: "blockTitle" }))``', errors: [ { message: `Fugaを正規表現 "/Heading$/" がmatchする名称に変更してください` } ] }, | ||
{ code: 'const Fuga = styled(HogeArticle)``', errors: [ { message: `Fugaを正規表現 "/Article$/" がmatchする名称に変更してください` } ] }, | ||
@@ -60,0 +62,0 @@ { code: 'const Fuga = styled(HogeAside)``', errors: [ { message: `Fugaを正規表現 "/Aside$/" がmatchする名称に変更してください` } ] }, |
231921
4045