From fdcfc774fbe3f5d64784afb3263dd5440afcac62 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 2 Oct 2025 14:24:17 +0200 Subject: [PATCH] Fixed linting issues --- src/components/Content/Sidenote/Container/index.tsx | 4 +++- src/components/Content/Sidenote/Item/index.tsx | 2 +- stylelint.config.mjs | 12 ++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/Content/Sidenote/Container/index.tsx b/src/components/Content/Sidenote/Container/index.tsx index c4c38ea..c2a451e 100644 --- a/src/components/Content/Sidenote/Container/index.tsx +++ b/src/components/Content/Sidenote/Container/index.tsx @@ -13,7 +13,9 @@ export default function Container({ items }: ContainerProps) { key={sidenote.id} id={sidenote.id} className={styles.wrapper} - style={{ positionAnchor: `--note-${sidenote.id}` }} + style={ + { positionAnchor: `--note-${sidenote.id}` } as React.CSSProperties + } >
diff --git a/src/components/Content/Sidenote/Item/index.tsx b/src/components/Content/Sidenote/Item/index.tsx index e6bb94b..32f9421 100644 --- a/src/components/Content/Sidenote/Item/index.tsx +++ b/src/components/Content/Sidenote/Item/index.tsx @@ -8,7 +8,7 @@ export default function SidenoteItem({ id, marker, content, type }: Sidenote) { href={`#${id}`} className={styles.ref} id={`#ref-${id}`} - style={{ anchorName: `--note-${id}` }} + style={{ anchorName: `--note-${id}` } as React.CSSProperties} > [{marker}] diff --git a/stylelint.config.mjs b/stylelint.config.mjs index 661c463..a1ba389 100644 --- a/stylelint.config.mjs +++ b/stylelint.config.mjs @@ -6,6 +6,18 @@ const stylelintConfig = { ], rules: { 'declaration-block-no-redundant-longhand-properties': null, + 'declaration-property-value-no-unknown': [ + true, + { + ignoreProperties: { + top: [/^anchor\(/], + left: [/^anchor\(/], + right: [/^anchor\(/], + bottom: [/^anchor\(/], + inset: [/^anchor\(/], + }, + }, + ], 'no-descending-specificity': null, 'selector-class-pattern': null, 'custom-property-pattern': null,