Skip to content

Commit 9c1c273

Browse files
committed
增加如Tailwind CSS ESLint配置,提高如Tailwind CSS使用优先级
1 parent 5b135b6 commit 9c1c273

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/reference/configuration/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,7 @@ module.exports = {
10861086
// 以下为实验性功能
10871087
'plugin:@typescript-eslint/stylistic-type-checked',
10881088
'plugin:unicorn/recommended',
1089+
'plugin:tailwindcss/recommended',
10891090
'plugin:promise/recommended',
10901091
'plugin:jsdoc/recommended-typescript',
10911092
'plugin:eslint-comments/recommended',
@@ -1126,6 +1127,7 @@ module.exports = {
11261127
'@vue/eslint-config-airbnb-with-typescript',
11271128
// '@vue/eslint-config-airbnb-with-typescript/allow-tsx-in-vue',
11281129
'plugin:no-unsanitized/recommended-legacy',
1130+
'plugin:tailwindcss/recommended',
11291131
],
11301132
};
11311133
```
@@ -1168,6 +1170,13 @@ module.exports = {
11681170
[https://stylelint.io/user-guide/configure](https://stylelint.io/user-guide/configure)
11691171
:::
11701172

1173+
:::tip
1174+
优先使用以下方案,减少 CSS 代码的编写:
1175+
1176+
- **原子化 CSS**:如Tailwind CSS,通过 utility 类直接在 HTML 中编写样式,减少了自定义 CSS 的需求。
1177+
- **UI 组件库**:主流的 UI 组件库(如 Ant Design、Material-UI)通常已经内置了良好的组件化和样式隔离方案,开发者直接使用即可。
1178+
:::
1179+
11711180
<Tabs>
11721181
<TabItem value="react" label="React/Next.js" default>
11731182
:::warning

docs/specification/code/css/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ sidebar_position: 2
44

55
# CSS 规范
66

7+
:::tip
8+
优先使用以下方案,减少 CSS 代码的编写:
9+
10+
- **原子化 CSS**:如Tailwind CSS,通过 utility 类直接在 HTML 中编写样式,减少了自定义 CSS 的需求。
11+
- **UI 组件库**:主流的 UI 组件库(如 Ant Design、Material-UI)通常已经内置了良好的组件化和样式隔离方案,开发者直接使用即可。
12+
:::
13+
714
```js
815
// stylelint.config.js
916

0 commit comments

Comments
 (0)