@icebreakers/eslint-config 5.0.4 → 7.0.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 CHANGED
@@ -50,8 +50,10 @@ export default icebreaker({
50
50
  query: true,
51
51
  typescript: true,
52
52
  test: true,
53
- tailwindcss: {
54
- tailwindConfig: './tailwind.config.ts',
53
+ tailwindcss: true,
54
+ betterTailwindcss: {
55
+ entryPoint: './src/tailwind.css',
56
+ rules: 'recommended',
55
57
  },
56
58
  unocss: {
57
59
  strict: true,
@@ -69,7 +71,8 @@ export default icebreaker({
69
71
  - `vue` – enables Vue + optionally version specific overrides (Vue 2/3) and ionic/miniProgram adjustments.
70
72
  - `react` – defers to the upstream React preset. The required React core lint plugins are bundled with this package; React accessibility still requires `eslint-plugin-jsx-a11y` when `a11y` is enabled.
71
73
  - `query` – toggles the TanStack Query plugin (`@tanstack/eslint-plugin-query`) and its recommended lint rules. Missing plugin installs are treated as a no-op.
72
- - `tailwindcss` – pass `true` to use the built-in Tailwind flat config or provide `{ entryPoint, tailwindConfig }` for Tailwind v4/v3 projects.
74
+ - `tailwindcss` – pass `true` to enable `eslint-plugin-tailwindcss`.
75
+ - `betterTailwindcss` – pass `true` or `{ entryPoint, tailwindConfig }` to enable `eslint-plugin-better-tailwindcss` for Tailwind v4/v3 projects. Object mode defaults to fast syntax checks (`no-duplicate-classes` and `no-unnecessary-whitespace`) and scopes relative entry points to their source directory; set `rules: 'recommended'` to opt into the full recommended preset.
73
76
  - `unocss` – pass `true` to use the upstream Antfu UnoCSS preset, or provide `{ strict, attributify, configPath }` to keep the same preset while using the Icebreaker wrapper API.
74
77
  - `mdx` – activates MDX linting via `eslint-plugin-mdx`.
75
78
  - `a11y` – wires in JSX (React) and Vue accessibility plugins. Missing framework-specific plugins are skipped independently.
package/README.zh.md CHANGED
@@ -76,8 +76,10 @@ export default icebreaker({
76
76
  query: true,
77
77
  typescript: true,
78
78
  test: true,
79
- tailwindcss: {
80
- tailwindConfig: './tailwind.config.ts',
79
+ tailwindcss: true,
80
+ betterTailwindcss: {
81
+ entryPoint: './src/tailwind.css',
82
+ rules: 'recommended',
81
83
  },
82
84
  mdx: process.env.LINT_MDX === 'true',
83
85
  a11y: true,
@@ -92,7 +94,8 @@ export default icebreaker({
92
94
  - `vue`:启用 Vue 规则,可根据 Vue 2/3 自动切换,并在 `ionic`、`miniProgram` 选项开启时追加对应覆盖。
93
95
  - `react`:复用上游 React 预设;React 核心 lint 插件已内置在当前包里,配合 `a11y` 使用的 React 无障碍插件仍需按需安装。
94
96
  - `query`:按需启用 TanStack Query 插件(`@tanstack/eslint-plugin-query`)及其推荐规则;缺少插件时按 no-op 处理。
95
- - `tailwindcss`:传入 `true` 使用内置 Tailwind flat 配置,或通过对象指定 Tailwind v4 的入口文件 / v3 的配置文件路径。
97
+ - `tailwindcss`:传入 `true` 启用 `eslint-plugin-tailwindcss`。
98
+ - `betterTailwindcss`:传入 `true` 或 `{ entryPoint, tailwindConfig }` 启用 `eslint-plugin-better-tailwindcss`,用于 Tailwind v4 / v3 项目。对象模式默认只启用较快的语法检查(`no-duplicate-classes` 和 `no-unnecessary-whitespace`),并会把相对入口文件限制到对应源码目录;如需完整推荐规则,可设置 `rules: 'recommended'`。
96
99
  - `mdx`:激活 `eslint-plugin-mdx` 处理 `.mdx` 文件。
97
100
  - `a11y`:按需引入 JSX 与 Vue 的无障碍规则,缺少某一侧插件时只跳过对应框架配置。
98
101
  - `typescript`:开启 TypeScript 预设,加强未使用诊断,可与 `nestjs` 搭配使用以获得 Nest 专属优化。