diff --git a/.changeset/unlucky-boxes-brake.md b/.changeset/unlucky-boxes-brake.md new file mode 100644 index 000000000..947696d7d --- /dev/null +++ b/.changeset/unlucky-boxes-brake.md @@ -0,0 +1,6 @@ +--- +'@compiled/eslint-plugin': patch +'@compiled/utils': patch +--- + +Fix border-inline-start and border-inline-end not having any valid ordering in the shorthand-property-sorting ESLint rule diff --git a/packages/eslint-plugin/src/rules/shorthand-property-sorting/__tests__/rule.test.ts b/packages/eslint-plugin/src/rules/shorthand-property-sorting/__tests__/rule.test.ts index 79f9732da..bc78d56b6 100644 --- a/packages/eslint-plugin/src/rules/shorthand-property-sorting/__tests__/rule.test.ts +++ b/packages/eslint-plugin/src/rules/shorthand-property-sorting/__tests__/rule.test.ts @@ -269,6 +269,23 @@ tester.run('shorthand-property-sorting', shorthandFirst, { export const EmphasisText = ({ children, status }) => {children}; `, }, + + // + // has a valid sorting for borderInlineStart and borderInlineEnd + // + + { + name: 'has a valid sorting for borderInlineStart and borderInlineEnd', + code: ` + import { styled } from '@compiled/react'; + + const Bap = styled.div({ + borderTop: 'none', + borderInlineStart: 'none', + borderInlineEnd: 'none', + }); + `, + }, ]), invalid: includedImports.flatMap((imp) => [ diff --git a/packages/utils/src/shorthand.ts b/packages/utils/src/shorthand.ts index dfae0911a..4872662db 100644 --- a/packages/utils/src/shorthand.ts +++ b/packages/utils/src/shorthand.ts @@ -232,9 +232,6 @@ export const shorthandFor: Record 'border-inline-end-color', 'border-inline-end-style', 'border-inline-end-width', - 'border-left-color', - 'border-left-style', - 'border-left-width', 'border-right-color', 'border-right-style', 'border-right-width', @@ -246,9 +243,6 @@ export const shorthandFor: Record 'border-left-color', 'border-left-style', 'border-left-width', - 'border-right-color', - 'border-right-style', - 'border-right-width', ], 'border-left': [ 'border-inline-start-color',