[postcss-linaria] Allow for alias of `css` in config
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript
- 領域
- tooling
調査の方向性
packages/postcss-linaria/src/parse.ts、特に関連する css/styled のマッチングロジックを読み、現在プラグインがどのように設定を受け取っているかを確認してください。両方のメソッドに対してエイリアスを設定できること、および stylelint がそれらのエイリアス経由で到達したテンプレートリテラル内の宣言を指摘することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
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
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/linaria のほかの issue
-
enhancement: proposal 💬 needs: triage 🏷
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
feature: proposal 💬 needs: triage 🏷
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
enhancement: proposal 💬 needs: triage 🏷
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
bug report 🦗 bundler: webpack 📦 needs: complete repro 🖥️
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
feature: proposal 💬 needs: triage 🏷
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
callstack/linaria の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/playwright#43327 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/TypeScript#64758 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
opensearch-project/OpenSearch-Dashboards#12937 ·
メンテナーはふだん 2 日以内に返信
-
Liveness marks block-included attesters live in the block's epoch instead of the attestation's epochオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
status: needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
a2ui-project/a2ui#3158 ·
メンテナーはふだん 2 日以内に返信