eslint-plugin-tailwindcss
Advanced tools
Comparing version 3.3.2 to 3.3.3
@@ -125,4 +125,9 @@ /** | ||
const range = astUtil.extractRangeFromNode(node); | ||
start = range[0] + 1; | ||
end = range[1] - 1; | ||
if (node.type === 'TextAttribute') { | ||
start = range[0]; | ||
end = range[1]; | ||
} else { | ||
start = range[0] + 1; | ||
end = range[1] - 1; | ||
} | ||
} else { | ||
@@ -129,0 +134,0 @@ switch (arg.type) { |
@@ -91,4 +91,9 @@ /** | ||
const range = astUtil.extractRangeFromNode(node); | ||
start = range[0] + 1; | ||
end = range[1] - 1; | ||
if (node.type === 'TextAttribute') { | ||
start = range[0]; | ||
end = range[1]; | ||
} else { | ||
start = range[0] + 1; | ||
end = range[1] - 1; | ||
} | ||
} else { | ||
@@ -95,0 +100,0 @@ switch (arg.type) { |
{ | ||
"name": "eslint-plugin-tailwindcss", | ||
"version": "3.3.2", | ||
"version": "3.3.3", | ||
"description": "Rules enforcing best practices while using Tailwind CSS", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -7,6 +7,10 @@ # eslint-plugin-tailwindcss | ||
Rules enforcing best practices and consistency using [Tailwind CSS](https://tailwindcss.com/) | ||
Rules enforcing best practices and consistency using [Tailwind CSS](https://tailwindcss.com/). | ||
## **π Version 3 is now ready for TailwindCSS v3 π** | ||
While you can use the official plugin [`prettier-plugin-tailwindcss`](https://www.npmjs.com/package/prettier-plugin-tailwindcss) for ordering your classnames... | ||
**`eslint-plugin-tailwindcss` offers 5 other rules, that you can benefit on top of `prettier-plugin-tailwindcss`. Sounds good ? Keep reading π** | ||
## **π Compatible with TailwindCSS v3 and v2 π** | ||
## Make sure to use the correct version | ||
@@ -37,2 +41,3 @@ | ||
- FIX: `migration-from-tailwind-2` and `enforces-shorthand` fixer with `@angular-eslint/template-parser` | ||
- FIX: [`no-custom-classname` rule prevents `migration-from-tailwind-2` rule](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/88) | ||
@@ -83,3 +88,3 @@ - FIX: [Escaping special characters in the `prefix`](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/73) | ||
``` | ||
$ npm i eslint --save-dev | ||
$ npm i -D eslint | ||
``` | ||
@@ -90,3 +95,3 @@ | ||
``` | ||
$ npm i eslint-plugin-tailwindcss --save-dev | ||
$ npm i -D eslint-plugin-tailwindcss | ||
``` | ||
@@ -96,3 +101,3 @@ | ||
> | ||
> π Install the latest version compatible with TailwindCSS v2 via `npm i eslint-plugin-tailwindcss@tw2 --save-dev` | ||
> π Install the latest version compatible with TailwindCSS v2 via `npm i -D eslint-plugin-tailwindcss@tw2` | ||
> | ||
@@ -188,2 +193,3 @@ > Please note that new rules might not be available in the `tw2` distribution | ||
- [prettier-plugin-tailwindcss](https://www.npmjs.com/package/prettier-plugin-tailwindcss), the official plugin, only takes care of ordering classnames, do not support array of classnames, do not support blade | ||
- [eslint-plugin-tailwind](https://www.npmjs.com/package/eslint-plugin-tailwind), not bad but no support (yet) for variants sorting | ||
@@ -190,0 +196,0 @@ - [Headwind](https://marketplace.visualstudio.com/items?itemName=heybourn.headwind), only works within Visual Studio Code |
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
148176
4087
197