Skip to content

Commit

Permalink
Merge pull request #1 from Kamahl19/Kamahl19-patch-1
Browse files Browse the repository at this point in the history
Fix francoismassart#378 - enforces-shorthand does not work for h- & w- when prefixed
  • Loading branch information
Kamahl19 authored Nov 25, 2024
2 parents 6dd917e + 932f2c9 commit fa085a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/enforces-shorthand.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ module.exports = {
}
// Test if the body of the class matches, eg. 'h-' inside 'h-10'
if (mode === 'value') {
const bodyMatch = inputSet.some((inputClassPattern) => inputClassPattern === remainingClass.body);
const bodyMatch = inputSet.some((inputClassPattern) => `${mergedConfig.prefix}${inputClassPattern}` === remainingClass.body);
if ([undefined, null].includes(mergedConfig.theme.size)) {
return false;
}
Expand Down

0 comments on commit fa085a1

Please sign in to comment.