@icebreakers/eslint-config 4.0.9 → 4.0.11

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
@@ -10,8 +10,8 @@
10
10
 
11
11
  - Node.js 22 or newer
12
12
  - ESLint 9 with flat config support
13
- - React related plugins are bundled with this package. Next.js, Query, and other ecosystem presets remain optional and are skipped automatically when their plugins are missing.
14
- - Install optional peer plugins when you turn on Tailwind (`eslint-plugin-tailwindcss` or `eslint-plugin-better-tailwindcss`), MDX (`eslint-plugin-mdx`), or UnoCSS (`@unocss/eslint-plugin`)
13
+ - React core plugins are bundled with this package. Next.js, Query, accessibility, and other ecosystem presets remain optional and are skipped automatically when their plugins are missing.
14
+ - Install optional plugins when you turn on Tailwind (`eslint-plugin-tailwindcss` or `eslint-plugin-better-tailwindcss`), MDX (`eslint-plugin-mdx`), UnoCSS (`@unocss/eslint-plugin`), React accessibility (`eslint-plugin-jsx-a11y`), or Vue accessibility (`eslint-plugin-vuejs-accessibility` plus its `globals` peer).
15
15
 
16
16
  ## Installation
17
17
 
@@ -67,7 +67,7 @@ export default icebreaker({
67
67
 
68
68
  - `miniProgram` – injects Mini Program globals, ignores common outputs/config files, and enables Vue-side Mini Program compatibility tweaks when `vue` is on.
69
69
  - `vue` – enables Vue + optionally version specific overrides (Vue 2/3) and ionic/miniProgram adjustments.
70
- - `react` – defers to the upstream React preset and unlocks accessibility helpers when `a11y` is enabled. The required React lint plugins are bundled with this package.
70
+ - `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
71
  - `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
72
  - `tailwindcss` – pass `true` to use the built-in Tailwind flat config or provide `{ entryPoint, tailwindConfig }` for Tailwind v4/v3 projects.
73
73
  - `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.
package/README.zh.md CHANGED
@@ -36,8 +36,8 @@ export default icebreaker({
36
36
 
37
37
  - Node.js 22 或更高版本
38
38
  - 支持 Flat Config 的 ESLint 9
39
- - React 相关插件已随当前包一起分发。Next.js、Query 等生态预设仍保持可选,缺失时会自动跳过对应配置,而不是在解析时直接报错。
40
- - 如需启用 Tailwind、MDX、UnoCSS 等,可安装对应的可选依赖:`eslint-plugin-tailwindcss` / `eslint-plugin-better-tailwindcss`、`eslint-plugin-mdx`、`@unocss/eslint-plugin`
39
+ - React 核心插件已随当前包一起分发。Next.js、Query、无障碍等生态预设仍保持可选,缺失时会自动跳过对应配置,而不是在解析时直接报错。
40
+ - 如需启用 Tailwind、MDX、UnoCSS、无障碍等,可安装对应的可选依赖:`eslint-plugin-tailwindcss` / `eslint-plugin-better-tailwindcss`、`eslint-plugin-mdx`、`@unocss/eslint-plugin`、React 无障碍的 `eslint-plugin-jsx-a11y`,以及 Vue 无障碍的 `eslint-plugin-vuejs-accessibility` 和它的 `globals` peer。
41
41
 
42
42
  ## 安装
43
43
 
@@ -90,7 +90,7 @@ export default icebreaker({
90
90
 
91
91
  - `miniProgram`:启用小程序预设,注入全局变量、忽略常见产物/配置文件,并在 `vue: true` 时补充小程序模板兼容调整。
92
92
  - `vue`:启用 Vue 规则,可根据 Vue 2/3 自动切换,并在 `ionic`、`miniProgram` 选项开启时追加对应覆盖。
93
- - `react`:复用上游 React 预设,配合 `a11y` 注入无障碍插件;所需的 React lint 插件已内置在当前包里。
93
+ - `react`:复用上游 React 预设;React 核心 lint 插件已内置在当前包里,配合 `a11y` 使用的 React 无障碍插件仍需按需安装。
94
94
  - `query`:按需启用 TanStack Query 插件(`@tanstack/eslint-plugin-query`)及其推荐规则;缺少插件时按 no-op 处理。
95
95
  - `tailwindcss`:传入 `true` 使用内置 Tailwind flat 配置,或通过对象指定 Tailwind v4 的入口文件 / v3 的配置文件路径。
96
96
  - `mdx`:激活 `eslint-plugin-mdx` 处理 `.mdx` 文件。
@@ -0,0 +1,64 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
9
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
+ var __exportAll = (all, no_symbols) => {
11
+ let target = {};
12
+ for (var name in all) __defProp(target, name, {
13
+ get: all[name],
14
+ enumerable: true
15
+ });
16
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
17
+ return target;
18
+ };
19
+ var __copyProps = (to, from, except, desc) => {
20
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
21
+ key = keys[i];
22
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
23
+ get: ((k) => from[k]).bind(null, key),
24
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
25
+ });
26
+ }
27
+ return to;
28
+ };
29
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
30
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
31
+ value: mod,
32
+ enumerable: true
33
+ }) : target, mod));
34
+ //#endregion
35
+ Object.defineProperty(exports, "__commonJSMin", {
36
+ enumerable: true,
37
+ get: function() {
38
+ return __commonJSMin;
39
+ }
40
+ });
41
+ Object.defineProperty(exports, "__esmMin", {
42
+ enumerable: true,
43
+ get: function() {
44
+ return __esmMin;
45
+ }
46
+ });
47
+ Object.defineProperty(exports, "__exportAll", {
48
+ enumerable: true,
49
+ get: function() {
50
+ return __exportAll;
51
+ }
52
+ });
53
+ Object.defineProperty(exports, "__reExport", {
54
+ enumerable: true,
55
+ get: function() {
56
+ return __reExport;
57
+ }
58
+ });
59
+ Object.defineProperty(exports, "__toESM", {
60
+ enumerable: true,
61
+ get: function() {
62
+ return __toESM;
63
+ }
64
+ });
@@ -1,9 +1,13 @@
1
- import "node:module";
1
+ import { createRequire } from "node:module";
2
2
  //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
6
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
10
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
7
11
  var __exportAll = (all, no_symbols) => {
8
12
  let target = {};
9
13
  for (var name in all) __defProp(target, name, {
@@ -24,5 +28,10 @@ var __copyProps = (to, from, except, desc) => {
24
28
  return to;
25
29
  };
26
30
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
31
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
32
+ value: mod,
33
+ enumerable: true
34
+ }) : target, mod));
35
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
27
36
  //#endregion
28
- export { __reExport as n, __exportAll as t };
37
+ export { __require as a, __reExport as i, __esmMin as n, __toESM as o, __exportAll as r, __commonJSMin as t };