Skip to content

fix(eslint-plugin): lint @emotion/css like the build - #903

Merged
owjs3901 merged 1 commit into
mainfrom
fix/eslint-emotion-css
Nov 14, 2026
Merged

owjs3901 merged 1 commit into
mainfrom
fix/eslint-emotion-css

Conversation

@owjs3901

Copy link
Copy Markdown
Contributor

Summary

  • The build aliases @emotion/css by default (DEFAULT_IMPORT_ALIASES) and turns a dynamic value into a build error. The eslint plugin didn't recognize the package, so no lint diagnostic appeared.
  • ImportStorage now recognizes @emotion/css. css and keyframes keep their names, and injectGlobal maps to globalCss (as the extractor's devup_equivalent does). cx, merge and the like take class names, so they are not bound.
  • Tests: dynamic values in @emotion/css's css and injectGlobal are now invalid, and static values plus cx(...) stay valid.

Refs #684 (TOOL-03/04: the @emotion/css gap)

Test plan

  • bun test packages/eslint-plugin --coverage: 100%. The one failing test is environmental (the local WASM pkg isn't built).
  • CI

🤖 Generated with Claude Code

The build aliases `@emotion/css` by default and rejects a dynamic value in its
`css`, but the lint rules did not know the package, so the editor stayed
silent until the build failed. Its `css`, `keyframes` and `injectGlobal` now
read as Devup UI's `css`, `keyframes` and `globalCss`, as the extractor maps
them.

Refs #684

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
packages/eslint-plugin/src/utils/import-storage.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@owjs3901
owjs3901 merged commit fa9f52a into main Nov 14, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant