I have added { from: string, as: string } syntax similar to importSources option in the babel plugin for compatibility with RSD, for both @stylexjs/sort-keys and @stylexjs/valid-styles rules.
I also checked the behavior locally in apps/nextjs-example dir by replacing imports with react-strict-dom and configuring with the new options as in the screenshot.
What changed / motivation ?
React Strict DOM recently removed their eslint plugin and I'm considering migrating to
@stylexjs/eslint-plugin
.However, react-strict-dom exports
stylex
undercss
object, and it is it incompatible with currentvalidImports
option in the eslint plugin.e.g. This doesn't work:
I have added
{ from: string, as: string }
syntax similar toimportSources
option in the babel plugin for compatibility with RSD, for both@stylexjs/sort-keys
and@stylexjs/valid-styles
rules.e.g. now the option accepts this format:
Additional Context
apps/nextjs-example
dir by replacing imports with react-strict-dom and configuring with the new options as in the screenshot.Pre-flight checklist