@dhzh/eslint-config 2.0.3 → 2.0.4

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.
@@ -6,7 +6,7 @@ import fsp from "node:fs/promises";
6
6
  import path from "node:path";
7
7
  import fs from "node:fs";
8
8
  //#region package.json
9
- var version = "2.0.3";
9
+ var version = "2.0.4";
10
10
  var devDependencies = {
11
11
  "@eslint/config-inspector": "^2.0.0",
12
12
  "@prettier/plugin-xml": "^3.4.2",
package/dist/index.mjs CHANGED
@@ -1146,7 +1146,7 @@ function format(options = {}) {
1146
1146
  //#region src/configs/tailwindcss.ts
1147
1147
  function tailwindcss(options = {}) {
1148
1148
  const { overrides = {} } = options;
1149
- return isPackageExists("tailwindcss") ? [...pluginTailwindcss.configs["flat/recommended"].map((item) => ({
1149
+ return isPackageAvailable("tailwindcss") ? [...pluginTailwindcss.configs["flat/recommended"].map((item) => ({
1150
1150
  ...item,
1151
1151
  name: `${RULE_PREFIX}/tailwindcss/shared/${item.name?.replace("tailwindcss:", "")}`,
1152
1152
  files: GLOB_SRC
@@ -1163,7 +1163,7 @@ function tailwindcss(options = {}) {
1163
1163
  //#region src/configs/unocss.ts
1164
1164
  function unocss(options = {}) {
1165
1165
  const { overrides = {} } = options;
1166
- if (!isPackageExists("unocss")) return [];
1166
+ if (!isPackageAvailable("unocss")) return [];
1167
1167
  return [{
1168
1168
  ...configUnocss,
1169
1169
  name: `${RULE_PREFIX}/unocss/shared`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dhzh/eslint-config",
3
3
  "type": "module",
4
- "version": "2.0.3",
4
+ "version": "2.0.4",
5
5
  "description": "tinywaves's ESLint config",
6
6
  "author": {
7
7
  "name": "Lyle Zheng",
@@ -101,7 +101,7 @@
101
101
  "typescript": "^6.0.3"
102
102
  },
103
103
  "simple-git-hooks": {
104
- "pre-commit": "npx lint-staged"
104
+ "pre-commit": "eval \"$(fnm env)\" && pnpm exec lint-staged"
105
105
  },
106
106
  "lint-staged": {
107
107
  "*": "eslint --fix"