Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[postcss-linaria] Allow for alias of `css` in config

オープン
#1,423 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
tooling

調査の方向性

packages/postcss-linaria/src/parse.ts、特に関連する css/styled のマッチングロジックを読み、現在プラグインがどのように設定を受け取っているかを確認してください。両方のメソッドに対してエイリアスを設定できること、および stylelint がそれらのエイリアス経由で到達したテンプレートリテラル内の宣言を指摘することを確認してください。

索引モデルが issue の本文から書いたものです。

説明

cat: modules aliasing 🔗 enhancement: proposal 💬 needs: triage 🏷

Describe the enhancement

Supply the ability to declare aliases for css and styled when running stylelint analysis for projects that export those methods from linaria with a different name.

Motivation

I'm using atomic styles in a personal project. I recently added stylelint with property-disallowed-list to flag uses of margin and padding, (to prompt using margin-left instead, etc) and it wasn't working... at all.

After a day of digging, it turned out the reason was I had abstracted the use of linaria out to a local import. And since I was needing to apply global styles for a component library, to differentiate css from core and atomic, I had done the following:

// lib/css
export { css as csa, styled } from '@linaria/atomic';
export { css } from '@linaria/core';

and

// some/component.styles.ts

import { csa } from '@lib/css';
...
csa`{
  margin-left: 10px;
}`

Because postcss-linaria looks specifically for css and styled the string literals weren't being flagged.

Possible implementations

Allow the ability to configure the syntax with aliases to each named method:

alias: {
  css: 'csa',
  styled: 'linariaStyled',
}

Related Issues

None I could find.

主要言語
TypeScript
スター
12.4k
フォーク
413
平均マージ
3日 4時間
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstack/linaria のほかの issue

callstack/linaria の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。