Skip to content

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

Fix no-hand-rolled-color lint rule to match color/index.ts

Danila Poyarkov7426e5d80bcd
diff --git a/lint/plugin.js b/lint/plugin.js
index d0c362b8d..b770c39ee 100644
--- a/lint/plugin.js
+++ b/lint/plugin.js
@@ -130,7 +130,7 @@ const noHandRolledColor = {
},
create(context) {
const file = context.filename ?? context.getFilename?.()
- if (file?.endsWith('color.ts') || file?.endsWith('color.js')) return {}
+ if (file?.includes('/color') && /(?:color\.ts|color\/index\.ts)$/.test(file)) return {}
return {
TemplateLiteral(node) {