Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-tailwindcss

Package Overview
Dependencies
Maintainers
1
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-tailwindcss - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

37

lib/rules/enforces-shorthand.js

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc