Skip to content

Commit

Permalink
fix(eslint-plugin): update the list of unsupported shorthands
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter committed May 21, 2024
1 parent 1a56464 commit 39764c2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 63 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix(eslint-plugin): update the list of unsupported shorthands",
"packageName": "@griffel/eslint-plugin",
"email": "olfedias@microsoft.com",
"dependentChangeType": "patch"
}
69 changes: 6 additions & 63 deletions packages/eslint-plugin/src/utils/shorthandToArguments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,76 +81,19 @@ export function buildShorthandSplitter(options: ShorthandSplitterOptions = {}) {

// This collection is a map simply for faster access when checking if a CSS property is unsupported
// @griffel/core has the same definition, but ESLint plugin should not depend on it
export const UNSUPPORTED_CSS_PROPERTIES: Record<keyof CSS.StandardShorthandProperties, true> = {
export const UNSUPPORTED_CSS_PROPERTIES: Partial<Record<keyof CSS.StandardShorthandProperties, true>> = {
all: true,
animation: true,
animationRange: true,
background: true,
backgroundPosition: true,
border: true,
borderColor: true,
borderStyle: true,
borderWidth: true,

borderBlock: true,
borderBlockEnd: true,
borderBlockStart: true,
borderBottom: true,
borderColor: true,
borderImage: true,
borderInline: true,
borderInlineEnd: true,
borderInlineStart: true,
borderLeft: true,
borderRadius: true,
borderRight: true,
borderStyle: true,
borderTop: true,
borderWidth: true,
caret: true,
columns: true,
columnRule: true,
containIntrinsicSize: true,
container: true,
flex: true,
flexFlow: true,
font: true,
gap: true,
grid: true,
gridArea: true,
gridColumn: true,
gridRow: true,
gridTemplate: true,
inset: true,
insetBlock: true,
insetInline: true,
lineClamp: true,
listStyle: true,
margin: true,
marginBlock: true,
marginInline: true,
mask: true,
maskBorder: true,
motion: true,
offset: true,
outline: true,
overflow: true,
overscrollBehavior: true,
padding: true,
paddingBlock: true,
paddingInline: true,
placeItems: true,
placeContent: true,
placeSelf: true,
scrollMargin: true,
scrollMarginBlock: true,
scrollMarginInline: true,
scrollPadding: true,
scrollPaddingBlock: true,
scrollPaddingInline: true,
scrollSnapMargin: true,
scrollTimeline: true,
textDecoration: true,
textEmphasis: true,
transition: true,
viewTimeline: true,
};
} as const;

const pxSplitter = buildShorthandSplitter({ numberUnit: 'px' });

Expand Down

0 comments on commit 39764c2

Please sign in to comment.