eslint-plugin-tailwindcss
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -308,18 +308,23 @@ /** | ||
const originalPatched = isSingleLine ? originalClassNamesValue.trim() : originalClassNamesValue; | ||
troubles.forEach((issue) => { | ||
if (originalPatched !== validatedClassNamesValue) { | ||
validatedClassNamesValue = prefix + validatedClassNamesValue + suffix; | ||
context.report({ | ||
node: node, | ||
messageId: 'shorthandCandidateDetected', | ||
data: { | ||
classnames: issue[0].join(', '), | ||
shorthand: issue[1], | ||
}, | ||
fix: function (fixer) { | ||
return fixer.replaceTextRange([start, end], validatedClassNamesValue); | ||
}, | ||
}); | ||
} | ||
}); | ||
troubles | ||
.filter((trouble) => { | ||
// Only valid issue if there are classes to replace | ||
return trouble[0].length; | ||
}) | ||
.forEach((issue) => { | ||
if (originalPatched !== validatedClassNamesValue) { | ||
validatedClassNamesValue = prefix + validatedClassNamesValue + suffix; | ||
context.report({ | ||
node: node, | ||
messageId: 'shorthandCandidateDetected', | ||
data: { | ||
classnames: issue[0].join(', '), | ||
shorthand: issue[1], | ||
}, | ||
fix: function (fixer) { | ||
return fixer.replaceTextRange([start, end], validatedClassNamesValue); | ||
}, | ||
}); | ||
} | ||
}); | ||
}; | ||
@@ -326,0 +331,0 @@ |
{ | ||
"name": "eslint-plugin-tailwindcss", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "Rules enforcing best practices while using Tailwind CSS", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -36,2 +36,4 @@ # eslint-plugin-tailwindcss | ||
- FIX: [FIX: `enforces-shorthand` false positive](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/91) | ||
- FIX: [`snap-x` and `snap-mandatory` are conflicting classes](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/90) | ||
@@ -38,0 +40,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137256
3793
197