@pengzhanbo/eslint-config 2.6.0 → 2.7.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.
Files changed (3) hide show
  1. package/dist/index.d.mts +1044 -233
  2. package/dist/index.mjs +11 -8
  3. package/package.json +33 -33
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { FlatConfigComposer } from "eslint-flat-config-utils";
2
2
  import process from "node:process";
3
- import fs from "node:fs/promises";
3
+ import fsPromises from "node:fs/promises";
4
4
  import { fileURLToPath } from "node:url";
5
- import fs$1 from "node:fs";
5
+ import fs from "node:fs";
6
6
  import path from "node:path";
7
7
  import { isPackageExists } from "local-pkg";
8
8
  import createCommand from "eslint-plugin-command/config";
@@ -27,7 +27,7 @@ async function findUp(name, { cwd = process.cwd(), type = "file", stopAt } = {})
27
27
  while (directory) {
28
28
  const filePath = isAbsoluteName ? name : path.join(directory, name);
29
29
  try {
30
- const stats = await fs.stat(filePath);
30
+ const stats = await fsPromises.stat(filePath);
31
31
  if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) return filePath;
32
32
  } catch {}
33
33
  if (directory === stopAt || directory === root) break;
@@ -42,7 +42,7 @@ function findUpSync(name, { cwd = process.cwd(), type = "file", stopAt } = {}) {
42
42
  while (directory) {
43
43
  const filePath = isAbsoluteName ? name : path.join(directory, name);
44
44
  try {
45
- const stats = fs$1.statSync(filePath, { throwIfNoEntry: false });
45
+ const stats = fs.statSync(filePath, { throwIfNoEntry: false });
46
46
  if (type === "file" && stats?.isFile() || type === "directory" && stats?.isDirectory()) return filePath;
47
47
  } catch {}
48
48
  if (directory === stopAt || directory === root) break;
@@ -1222,7 +1222,7 @@ async function perfectionist(options) {
1222
1222
  async function detectCatalogUsage() {
1223
1223
  const workspaceFile = await findUp("pnpm-workspace.yaml");
1224
1224
  if (!workspaceFile) return false;
1225
- const yaml = await fs.readFile(workspaceFile, "utf-8");
1225
+ const yaml = await fsPromises.readFile(workspaceFile, "utf-8");
1226
1226
  return yaml.includes("catalog:") || yaml.includes("catalogs:");
1227
1227
  }
1228
1228
  async function pnpm(options) {
@@ -1806,7 +1806,7 @@ async function tailwindcss(options = {}) {
1806
1806
  return [];
1807
1807
  }
1808
1808
  const [pluginTailwindcss] = await Promise.all([interopDefault(import("eslint-plugin-tailwindcss"))]);
1809
- const cssFiles = cssFilesFilter ? [...new Set([
1809
+ const cssFiles = cssFilesFilter ? [.../* @__PURE__ */ new Set([
1810
1810
  "**/*.css",
1811
1811
  "!**/node_modules",
1812
1812
  "!**/.*",
@@ -2055,8 +2055,11 @@ async function typescript(options = {}) {
2055
2055
  async function unicorn(options = {}) {
2056
2056
  const { allRecommended = false, overrides = {} } = options;
2057
2057
  return [{
2058
- name: "config/unicorn",
2059
- plugins: { unicorn: pluginUnicorn },
2058
+ name: "config/unicorn/setup",
2059
+ plugins: { unicorn: pluginUnicorn }
2060
+ }, {
2061
+ files: [GLOB_SRC],
2062
+ name: "config/unicorn/rules",
2060
2063
  rules: {
2061
2064
  ...allRecommended ? pluginUnicorn.configs.recommended.rules : {
2062
2065
  "unicorn/consistent-empty-array-spread": "error",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pengzhanbo/eslint-config",
3
3
  "type": "module",
4
- "version": "2.6.0",
4
+ "version": "2.7.0",
5
5
  "author": "pengzhanbo <q942450674@outlook.com> (https://github/pengzhanbo/)",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/pengzhanbo/configs#readme",
@@ -25,18 +25,18 @@
25
25
  "@angular-eslint/eslint-plugin": "^22.0.0",
26
26
  "@angular-eslint/eslint-plugin-template": "^22.0.0",
27
27
  "@angular-eslint/template-parser": "^22.0.0",
28
- "@eslint-react/eslint-plugin": "^5.8.16",
29
- "@next/eslint-plugin-next": "^16.2.7",
28
+ "@eslint-react/eslint-plugin": "^5.9.5",
29
+ "@next/eslint-plugin-next": "^16.2.9",
30
30
  "@prettier/plugin-xml": "^3.4.2",
31
- "@unocss/eslint-plugin": "^66.7.0",
32
- "astro-eslint-parser": "^1.4.0",
33
- "eslint": "^10.4.1",
34
- "eslint-plugin-astro": "^1.7.0",
31
+ "@unocss/eslint-plugin": "^66.7.3",
32
+ "astro-eslint-parser": "^2.1.0",
33
+ "eslint": "^10.5.0",
34
+ "eslint-plugin-astro": "^2.1.1",
35
35
  "eslint-plugin-format": "^2.0.1",
36
- "eslint-plugin-react-refresh": "^0.5.2",
36
+ "eslint-plugin-react-refresh": "^0.5.3",
37
37
  "eslint-plugin-solid": "^0.14.5",
38
- "eslint-plugin-svelte": "^3.19.0",
39
- "eslint-plugin-tailwindcss": "^3.18.3",
38
+ "eslint-plugin-svelte": "^3.20.0",
39
+ "eslint-plugin-tailwindcss": "^4.0.4",
40
40
  "eslint-plugin-vue": "^10.9.2",
41
41
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
42
42
  "eslint-processor-vue-blocks": "^2.0.0",
@@ -109,33 +109,33 @@
109
109
  },
110
110
  "dependencies": {
111
111
  "@antfu/install-pkg": "^1.1.0",
112
- "@e18e/eslint-plugin": "^0.5.0",
112
+ "@e18e/eslint-plugin": "^0.5.1",
113
113
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
114
114
  "@eslint/markdown": "^8.0.2",
115
115
  "@stylistic/eslint-plugin": "^5.10.0",
116
- "@typescript-eslint/eslint-plugin": "^8.60.1",
117
- "@typescript-eslint/parser": "^8.60.1",
118
- "@vitest/eslint-plugin": "^1.6.19",
116
+ "@typescript-eslint/eslint-plugin": "^8.62.0",
117
+ "@typescript-eslint/parser": "^8.62.0",
118
+ "@vitest/eslint-plugin": "^1.6.20",
119
119
  "eslint-config-flat-gitignore": "^2.3.0",
120
120
  "eslint-flat-config-utils": "^3.2.0",
121
121
  "eslint-merge-processors": "^2.0.0",
122
122
  "eslint-plugin-antfu": "^3.2.3",
123
123
  "eslint-plugin-command": "^3.5.2",
124
- "eslint-plugin-erasable-syntax-only": "^0.4.1",
124
+ "eslint-plugin-erasable-syntax-only": "^0.4.2",
125
125
  "eslint-plugin-import-lite": "^0.6.0",
126
- "eslint-plugin-jsdoc": "^63.0.2",
126
+ "eslint-plugin-jsdoc": "^63.0.9",
127
127
  "eslint-plugin-jsonc": "^3.2.0",
128
128
  "eslint-plugin-jsx-a11y": "^6.10.2",
129
- "eslint-plugin-n": "^18.0.1",
129
+ "eslint-plugin-n": "^18.2.1",
130
130
  "eslint-plugin-no-only-tests": "^3.4.0",
131
- "eslint-plugin-perfectionist": "^5.9.0",
131
+ "eslint-plugin-perfectionist": "^5.9.1",
132
132
  "eslint-plugin-pnpm": "^1.6.1",
133
- "eslint-plugin-regexp": "^3.1.0",
133
+ "eslint-plugin-regexp": "^3.1.1",
134
134
  "eslint-plugin-toml": "^1.4.0",
135
- "eslint-plugin-unicorn": "^65.0.0",
135
+ "eslint-plugin-unicorn": "^69.0.0",
136
136
  "eslint-plugin-unused-imports": "^4.4.1",
137
- "eslint-plugin-yml": "^3.4.0",
138
- "globals": "^17.6.0",
137
+ "eslint-plugin-yml": "^3.5.0",
138
+ "globals": "^17.7.0",
139
139
  "local-pkg": "^1.2.1",
140
140
  "parse-gitignore": "^2.0.0",
141
141
  "toml-eslint-parser": "^1.0.3",
@@ -145,20 +145,20 @@
145
145
  "@angular-eslint/eslint-plugin": "^22.0.0",
146
146
  "@angular-eslint/eslint-plugin-template": "^22.0.0",
147
147
  "@angular-eslint/template-parser": "^22.0.0",
148
- "@angular/core": "^22.0.0",
149
- "@eslint-react/eslint-plugin": "^5.8.16",
148
+ "@angular/core": "^22.0.4",
149
+ "@eslint-react/eslint-plugin": "^5.9.5",
150
150
  "@eslint/config-inspector": "^3.0.4",
151
- "@next/eslint-plugin-next": "^16.2.7",
151
+ "@next/eslint-plugin-next": "^16.2.9",
152
152
  "@prettier/plugin-xml": "^3.4.2",
153
- "@unocss/eslint-plugin": "^66.7.0",
154
- "astro-eslint-parser": "^1.4.0",
155
- "eslint": "^10.4.1",
156
- "eslint-plugin-astro": "^1.7.0",
153
+ "@unocss/eslint-plugin": "^66.7.3",
154
+ "astro-eslint-parser": "^2.1.0",
155
+ "eslint": "^10.5.0",
156
+ "eslint-plugin-astro": "^2.1.1",
157
157
  "eslint-plugin-format": "^2.0.1",
158
- "eslint-plugin-react-refresh": "^0.5.2",
158
+ "eslint-plugin-react-refresh": "^0.5.3",
159
159
  "eslint-plugin-solid": "^0.14.5",
160
- "eslint-plugin-svelte": "^3.19.0",
161
- "eslint-plugin-tailwindcss": "^3.18.3",
160
+ "eslint-plugin-svelte": "^3.20.0",
161
+ "eslint-plugin-tailwindcss": "^4.0.4",
162
162
  "eslint-plugin-vue": "^10.9.2",
163
163
  "eslint-plugin-vuejs-accessibility": "^2.5.0",
164
164
  "eslint-processor-vue-blocks": "^2.0.0",
@@ -166,7 +166,7 @@
166
166
  "find-up-simple": "^1.0.1",
167
167
  "prettier-plugin-astro": "^0.14.1",
168
168
  "prettier-plugin-slidev": "^1.0.5",
169
- "svelte": "^5.56.3",
169
+ "svelte": "^5.56.4",
170
170
  "svelte-eslint-parser": "^1.8.0",
171
171
  "vue-eslint-parser": "^10.4.1"
172
172
  },