Skip to content

AI-native design editor. Open-source Figma alternative.

fix(lint): normalize file paths in custom rules for Windows CI

Danila Poyarkovf2136c6be670
diff --git a/lint/plugin.js b/lint/plugin.js
index b770c39ee..639ea583b 100644
--- a/lint/plugin.js
+++ b/lint/plugin.js
@@ -129,7 +129,7 @@ const noHandRolledColor = {
},
},
create(context) {
- const file = context.filename ?? context.getFilename?.()
+ const file = (context.filename ?? context.getFilename?.())?.replace(/\\/g, '/')
if (file?.includes('/color') && /(?:color\.ts|color\/index\.ts)$/.test(file)) return {}
return {
@@ -222,7 +222,7 @@ const noTypeofWindowCheck = {
},
},
create(context) {
- const file = context.filename ?? context.getFilename?.()
+ const file = (context.filename ?? context.getFilename?.())?.replace(/\\/g, '/')
if (file?.endsWith('constants.ts')) return {}
return {