Skip to content

Commit

Permalink
address comments to highlight nonstandard css
Browse files Browse the repository at this point in the history
  • Loading branch information
mellyeliu committed Dec 10, 2024
1 parent d19c205 commit df8c7a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions packages/eslint-plugin/__tests__/stylex-valid-styles-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,35 +617,35 @@ eslintTester.run('stylex-valid-styles', rule.default, {
errors: [
{
message:
'The key "marginStart" is not allowed by stylex. Use "marginInlineStart" instead.',
'The key "marginStart" is not a standard CSS property. Did you mean "marginInlineStart"?',
},
{
message:
'The key "marginEnd" is not allowed by stylex. Use "marginInlineEnd" instead.',
'The key "marginEnd" is not a standard CSS property. Did you mean "marginInlineEnd"?',
},
{
message:
'The key "marginHorizontal" is not allowed by stylex. Use "marginInline" instead.',
'The key "marginHorizontal" is not a standard CSS property. Did you mean "marginInline"?',
},
{
message:
'The key "marginVertical" is not allowed by stylex. Use "marginBlock" instead.',
'The key "marginVertical" is not a standard CSS property. Did you mean "marginBlock"?',
},
{
message:
'The key "paddingStart" is not allowed by stylex. Use "paddingInlineStart" instead.',
'The key "paddingStart" is not a standard CSS property. Did you mean "paddingInlineStart"?',
},
{
message:
'The key "paddingEnd" is not allowed by stylex. Use "paddingInlineEnd" instead.',
'The key "paddingEnd" is not a standard CSS property. Did you mean "paddingInlineEnd"?',
},
{
message:
'The key "paddingHorizontal" is not allowed by stylex. Use "paddingInline" instead.',
'The key "paddingHorizontal" is not a standard CSS property. Did you mean "paddingInline"?',
},
{
message:
'The key "paddingVertical" is not allowed by stylex. Use "paddingBlock" instead.',
'The key "paddingVertical" is not a standard CSS property. Did you mean "paddingBlock"?',
},
],
output: `
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/stylex-valid-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2674,7 +2674,7 @@ const stylexValidStyles = {
message:
replacementKey &&
(style.key.type === 'Identifier' || style.key.type === 'Literal')
? `The key "${originalKey}" is not allowed by stylex. Use "${replacementKey}" instead.`
? `The key "${originalKey}" is not a standard CSS property. Did you mean "${replacementKey}"?`
: 'This is not a key that is allowed by stylex',
fix: (fixer) => {
if (replacementKey) {
Expand Down

0 comments on commit df8c7a3

Please sign in to comment.