@pengzhanbo/eslint-config 2.6.1 → 2.7.1

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 +3801 -1720
  2. package/dist/index.mjs +12 -8
  3. package/package.json +47 -47
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) {
@@ -1556,6 +1556,7 @@ async function sortPackageJson() {
1556
1556
  "activationEvents",
1557
1557
  "contributes",
1558
1558
  "scripts",
1559
+ "scripts-info",
1559
1560
  "peerDependencies",
1560
1561
  "peerDependenciesMeta",
1561
1562
  "dependencies",
@@ -1806,7 +1807,7 @@ async function tailwindcss(options = {}) {
1806
1807
  return [];
1807
1808
  }
1808
1809
  const [pluginTailwindcss] = await Promise.all([interopDefault(import("eslint-plugin-tailwindcss"))]);
1809
- const cssFiles = cssFilesFilter ? [...new Set([
1810
+ const cssFiles = cssFilesFilter ? [.../* @__PURE__ */ new Set([
1810
1811
  "**/*.css",
1811
1812
  "!**/node_modules",
1812
1813
  "!**/.*",
@@ -2055,8 +2056,11 @@ async function typescript(options = {}) {
2055
2056
  async function unicorn(options = {}) {
2056
2057
  const { allRecommended = false, overrides = {} } = options;
2057
2058
  return [{
2058
- name: "config/unicorn",
2059
- plugins: { unicorn: pluginUnicorn },
2059
+ name: "config/unicorn/setup",
2060
+ plugins: { unicorn: pluginUnicorn }
2061
+ }, {
2062
+ files: [GLOB_SRC],
2063
+ name: "config/unicorn/rules",
2060
2064
  rules: {
2061
2065
  ...allRecommended ? pluginUnicorn.configs.recommended.rules : {
2062
2066
  "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.1",
4
+ "version": "2.7.1",
5
5
  "author": "pengzhanbo <q942450674@outlook.com> (https://github/pengzhanbo/)",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/pengzhanbo/configs#readme",
@@ -22,22 +22,22 @@
22
22
  "dist"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@angular-eslint/eslint-plugin": "^22.0.0",
26
- "@angular-eslint/eslint-plugin-template": "^22.0.0",
27
- "@angular-eslint/template-parser": "^22.0.0",
28
- "@eslint-react/eslint-plugin": "^5.8.16",
29
- "@next/eslint-plugin-next": "^16.2.7",
25
+ "@angular-eslint/eslint-plugin": "^22.1.0",
26
+ "@angular-eslint/eslint-plugin-template": "^22.1.0",
27
+ "@angular-eslint/template-parser": "^22.1.0",
28
+ "@eslint-react/eslint-plugin": "^5.17.3",
29
+ "@next/eslint-plugin-next": "^16.2.11",
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.5",
32
+ "astro-eslint-parser": "^3.0.0",
33
+ "eslint": "^10.7.0",
34
+ "eslint-plugin-astro": "^3.0.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",
40
- "eslint-plugin-vue": "^10.9.2",
38
+ "eslint-plugin-svelte": "^3.22.0",
39
+ "eslint-plugin-tailwindcss": "^4.2.0",
40
+ "eslint-plugin-vue": "^10.10.0",
41
41
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
42
42
  "eslint-processor-vue-blocks": "^2.0.0",
43
43
  "prettier-plugin-astro": "^0.14.1",
@@ -108,65 +108,65 @@
108
108
  }
109
109
  },
110
110
  "dependencies": {
111
- "@antfu/install-pkg": "^1.1.0",
112
- "@e18e/eslint-plugin": "^0.5.0",
111
+ "@antfu/install-pkg": "^2.0.1",
112
+ "@e18e/eslint-plugin": "^0.5.1",
113
113
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
114
- "@eslint/markdown": "^8.0.2",
114
+ "@eslint/markdown": "^8.0.3",
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.65.0",
117
+ "@typescript-eslint/parser": "^8.65.0",
118
+ "@vitest/eslint-plugin": "^1.6.23",
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
- "eslint-plugin-command": "^3.5.2",
124
- "eslint-plugin-erasable-syntax-only": "^0.4.1",
123
+ "eslint-plugin-command": "^3.5.3",
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",
127
- "eslint-plugin-jsonc": "^3.2.0",
126
+ "eslint-plugin-jsdoc": "^63.2.0",
127
+ "eslint-plugin-jsonc": "^3.3.0",
128
128
  "eslint-plugin-jsx-a11y": "^6.10.2",
129
- "eslint-plugin-n": "^18.0.1",
129
+ "eslint-plugin-n": "^18.2.2",
130
130
  "eslint-plugin-no-only-tests": "^3.4.0",
131
- "eslint-plugin-perfectionist": "^5.9.0",
131
+ "eslint-plugin-perfectionist": "^5.10.0",
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": "^72.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.6.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",
142
- "yaml-eslint-parser": "^2.0.0"
142
+ "yaml-eslint-parser": "^2.1.0"
143
143
  },
144
144
  "devDependencies": {
145
- "@angular-eslint/eslint-plugin": "^22.0.0",
146
- "@angular-eslint/eslint-plugin-template": "^22.0.0",
147
- "@angular-eslint/template-parser": "^22.0.0",
148
- "@angular/core": "^22.0.0",
149
- "@eslint-react/eslint-plugin": "^5.8.16",
150
- "@eslint/config-inspector": "^3.0.4",
151
- "@next/eslint-plugin-next": "^16.2.7",
145
+ "@angular-eslint/eslint-plugin": "^22.1.0",
146
+ "@angular-eslint/eslint-plugin-template": "^22.1.0",
147
+ "@angular-eslint/template-parser": "^22.1.0",
148
+ "@angular/core": "^22.0.7",
149
+ "@eslint-react/eslint-plugin": "^5.17.3",
150
+ "@eslint/config-inspector": "^3.1.0",
151
+ "@next/eslint-plugin-next": "^16.2.11",
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.5",
154
+ "astro-eslint-parser": "^3.0.0",
155
+ "eslint": "^10.7.0",
156
+ "eslint-plugin-astro": "^3.0.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",
162
- "eslint-plugin-vue": "^10.9.2",
160
+ "eslint-plugin-svelte": "^3.22.0",
161
+ "eslint-plugin-tailwindcss": "^4.2.0",
162
+ "eslint-plugin-vue": "^10.10.0",
163
163
  "eslint-plugin-vuejs-accessibility": "^2.5.0",
164
164
  "eslint-processor-vue-blocks": "^2.0.0",
165
165
  "eslint-typegen": "^2.3.1",
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.7",
170
170
  "svelte-eslint-parser": "^1.8.0",
171
171
  "vue-eslint-parser": "^10.4.1"
172
172
  },