@seanyeh77/eslint-plugin-ui 0.40.0 → 0.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # @seanyeh77/eslint-plugin-ui
2
+
3
+ 讓用 `@seanyeh77/ui` 寫的程式碼守住設計系統規則的 ESLint 規則:只用 token 顏色(`no-raw-color`、`no-tailwind-defaults`)、用元件取代原生控制項(`no-native-controls`)、卡片裡不再放卡片(`no-nested-card`)、每區最多一個主要按鈕(`one-primary-button`)、按鈕文字用動詞(`verb-labels`)、危險動作要確認(`danger-confirm`)。
4
+
5
+ ## 安裝
6
+
7
+ ```bash
8
+ npm i -D @seanyeh77/eslint-plugin-ui
9
+ ```
10
+
11
+ ```js
12
+ // eslint.config.js
13
+ import ui from '@seanyeh77/eslint-plugin-ui';
14
+
15
+ export default [ui.configs.recommended];
16
+ ```
17
+
18
+ 設定用 typescript-eslint 的 parser 讀 `.tsx`,需要 `typescript` 5 或 6 的 API;只裝了 TypeScript 7 時,另外安裝 `typescript@npm:@typescript/typescript6` 當 dev dependency。
19
+
20
+ ## 文件
21
+
22
+ - 文件網站:<https://seanyeh77.github.io/ui-design-system/>
23
+ - 給 AI agent 的使用說明:[AGENTS.md](https://github.com/seanyeh77/ui-design-system/blob/main/AGENTS.md)
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import tsParser from "@typescript-eslint/parser";
2
2
  // package.json
3
3
  var name = "@seanyeh77/eslint-plugin-ui";
4
- var version = "0.40.0";
4
+ var version = "0.42.0";
5
5
  // src/index.ts
6
6
  const valueOf = (n) => n.value;
7
7
  const COLOR = /#[0-9a-fA-F]{3,8}\b|\brgba?\(|\bhsla?\(|\boklch\(/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seanyeh77/eslint-plugin-ui",
3
- "version": "0.40.0",
3
+ "version": "0.42.0",
4
4
  "description": "ESLint rules for SeanYeh's design system: token colors only, design-system components instead of native controls, no card in a card, one primary button, verb labels.",
5
5
  "license": "MIT",
6
6
  "author": "Hsiu-An Yeh",