Skip to content

Conversation

@Anber
Copy link
Collaborator

@Anber Anber commented Jan 26, 2026

Motivation

@linaria/postcss-linaria has a Jest test suite, but it hasn’t been exercised by CI because the package had no test script (see #1455).

When enabling it, a few tests fail on a clean checkout because:

  • stylelint resolves extends relative to CWD unless configBasedir is provided.
  • placeholder identifiers were using pcss_lin (underscore), which doesn’t match kebab-case rules and doesn’t match the config’s ignoreComments: [/pcss-lin/].
  • location offsets needed different adjustment for source.start vs source.end.

Summary

  • Add test script for @linaria/postcss-linaria so turbo run test/check:all can execute it.
  • Make @linaria/postcss-linaria#test depend on @linaria/postcss-linaria#build (stylelint config uses the published entry, which requires built output).
  • Fix locationCorrection offset math for end positions.
  • Switch placeholder prefix to pcss-lin (kebab-case) to match stylelint rules and ignore patterns.
  • Fix stylelint tests by passing configBasedir.

Test plan

  • pnpm turbo run test --filter @linaria/postcss-linaria
  • pnpm lint

@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2026

🦋 Changeset detected

Latest commit: 4c46401

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@linaria/postcss-linaria Patch
@linaria/stylelint-config-standard-linaria Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Anber Anber merged commit b04f025 into callstack:master Jan 26, 2026
5 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