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

This commit is contained in:
Danila Poyarkov 2026-04-06 23:30:38 +03:00
parent 862c0f28dc
commit 7426e5d80b

View file

@ -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) {