Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -852,59 +852,6 @@ eslintTester.run('stylex-valid-styles', rule.default, {
},
],
},
{
code: "import * as stylex from '@stylexjs/stylex'; stylex.create({default: {textAlin: 'left'}});",
errors: [
{
message: 'This is not a key that is allowed by stylex',
suggestions: [
{
desc: 'Did you mean "textAlign"?',
output:
"import * as stylex from '@stylexjs/stylex'; stylex.create({default: {textAlign: 'left'}});",
},
],
},
],
},
{
code: "import * as stylex from '@stylexjs/stylex'; stylex.create({default: {marginStart: 10}});",
errors: [
{
message: 'This is not a key that is allowed by stylex',
},
],
},
{
code: "import * as stylex from '@stylexjs/stylex'; stylex.create({default: {textAlin: 'left'}});",
errors: [
{
message: 'This is not a key that is allowed by stylex',
suggestions: [
{
desc: 'Did you mean "textAlign"?',
output:
"import * as stylex from '@stylexjs/stylex'; stylex.create({default: {textAlign: 'left'}});",
},
],
},
],
},
{
code: "import * as stylex from '@stylexjs/stylex'; stylex.create({default: {[\"textAlin\"]: 'left'}});",
errors: [
{
message: 'This is not a key that is allowed by stylex',
suggestions: [
{
desc: 'Did you mean "textAlign"?',
output:
"import * as stylex from '@stylexjs/stylex'; stylex.create({default: {[\"textAlign\"]: 'left'}});",
},
],
},
],
},
{
code: "import * as stylex from '@stylexjs/stylex'; stylex.create({default: {textAlign: 'lfet'}});",
errors: [
Expand Down Expand Up @@ -958,15 +905,6 @@ revert`,
},
],
},
{
code: "import * as stylex from '@stylexjs/stylex'; stylex.create({default: {':hover': {textAlin: 'left'}}});",
options: [{ allowOuterPseudoAndMedia: true }],
errors: [
{
message: 'This is not a key that is allowed by stylex',
},
],
},
{
code: "import * as stylex from '@stylexjs/stylex'; stylex.create({default: {':focus': {textAlign: 'lfet'}}});",
options: [{ allowOuterPseudoAndMedia: true }],
Expand Down Expand Up @@ -1705,18 +1643,6 @@ eslintTester.run('stylex-valid-styles [restrictions]', rule.default, {
},
});`,
},
// test for allowed raw CSS variable overrides
{
code: `
import * as stylex from '@stylexjs/stylex';
const styles = stylex.create({
foo: {
'--bar': '0',
}
})
`,
options: [{ allowRawCSSVars: true }],
},
{
code: `
import * as stylex from '@stylexjs/stylex';
Expand Down Expand Up @@ -2121,22 +2047,7 @@ revert`,
],
},
// test for disallowed raw CSS variable overrides
{
code: `
import * as stylex from '@stylexjs/stylex';
const styles = stylex.create({
foo: {
'--bar': '0',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, we likely want to keep this in the original valid-styles rule, as CSS variable overrides aren't really a CSS property

}
})
`,
options: [{ allowRawCSSVars: false }],
errors: [
{
message: 'This is not a key that is allowed by stylex',
},
],
},

{
code: `
import * as stylex from '@stylexjs/stylex';
Expand Down
Loading