build: use correct tailwind config to lint (#2947)

This commit is contained in:
Stephen Zhou
2025-03-03 21:26:07 +08:00
committed by GitHub
parent 8d8dafa37d
commit 9fffc982b1
3 changed files with 36 additions and 3 deletions
+2 -1
View File
@@ -101,7 +101,8 @@
"devlop": "patches/devlop.patch",
"@microflash/remark-callout-directives": "patches/@microflash__remark-callout-directives.patch",
"react-native-track-player": "patches/react-native-track-player.patch",
"react-native-sheet-transitions": "patches/react-native-sheet-transitions.patch"
"react-native-sheet-transitions": "patches/react-native-sheet-transitions.patch",
"eslint-plugin-tailwindcss": "patches/eslint-plugin-tailwindcss.patch"
},
"overrides": {
"app-builder-lib": "25.1.8",
+29
View File
@@ -0,0 +1,29 @@
diff --git a/lib/util/customConfig.js b/lib/util/customConfig.js
index 1ab15994a1e236b11fe8f3fd03404cea32c7099c..cc946deb2b6280738ee96346fcc85cb0f67f181b 100644
--- a/lib/util/customConfig.js
+++ b/lib/util/customConfig.js
@@ -48,7 +48,7 @@ function loadConfig(config) {
if (stats === null) {
// Default to no config
loadedConfig = {};
- } else if (lastModifiedDate !== mtime) {
+ } else if (lastModifiedDate !== mtime || previousConfig !== config) {
// Load the config based on path
lastModifiedDate = mtime;
loadedConfig = requireUncached(resolvedPath);
@@ -86,13 +86,13 @@ function resolve(twConfig) {
const now = Date.now();
const expired = now - lastCheck > CHECK_REFRESH_RATE;
if (newConfig || expired) {
- previousConfig = twConfig;
- lastCheck = now;
const userConfig = loadConfig(twConfig);
// userConfig is null when config file was not modified
if (userConfig !== null) {
mergedConfig = resolveConfig(userConfig);
}
+ previousConfig = twConfig;
+ lastCheck = now;
}
return mergedConfig;
}
+5 -2
View File
@@ -35,6 +35,9 @@ patchedDependencies:
electron-context-menu:
hash: c53at4t5fflixuwjz35hmcqdu4
path: patches/electron-context-menu.patch
eslint-plugin-tailwindcss:
hash: igoijrlnqg6vq3c25a3kjqlyq4
path: patches/eslint-plugin-tailwindcss.patch
hono:
hash: qptujxncoai6tukc4qaqsrqk24
path: patches/hono.patch
@@ -23723,7 +23726,7 @@ snapshots:
eslint-plugin-react-refresh: 0.4.19(eslint@9.20.1(jiti@2.4.2))
eslint-plugin-regexp: 2.7.0(eslint@9.20.1(jiti@2.4.2))
eslint-plugin-simple-import-sort: 12.1.1(eslint@9.20.1(jiti@2.4.2))
eslint-plugin-tailwindcss: 3.18.0(tailwindcss@3.4.16(ts-node@10.9.2(@types/node@22.13.4)(typescript@5.7.3)))
eslint-plugin-tailwindcss: 3.18.0(patch_hash=igoijrlnqg6vq3c25a3kjqlyq4)(tailwindcss@3.4.16(ts-node@10.9.2(@types/node@22.13.4)(typescript@5.7.3)))
eslint-plugin-unicorn: 56.0.1(eslint@9.20.1(jiti@2.4.2))
eslint-plugin-unused-imports: 4.1.4(@typescript-eslint/eslint-plugin@8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.20.1(jiti@2.4.2))(typescript@5.7.3))(eslint@9.20.1(jiti@2.4.2))(typescript@5.7.3))(eslint@9.20.1(jiti@2.4.2))
globals: 15.15.0
@@ -24107,7 +24110,7 @@ snapshots:
dependencies:
eslint: 9.20.1(jiti@2.4.2)
eslint-plugin-tailwindcss@3.18.0(tailwindcss@3.4.16(ts-node@10.9.2(@types/node@22.13.4)(typescript@5.7.3))):
eslint-plugin-tailwindcss@3.18.0(patch_hash=igoijrlnqg6vq3c25a3kjqlyq4)(tailwindcss@3.4.16(ts-node@10.9.2(@types/node@22.13.4)(typescript@5.7.3))):
dependencies:
fast-glob: 3.3.3
postcss: 8.5.2