eslint-plugin-tailwindcss
Advanced tools
Comparing version 3.10.0 to 3.10.1-beta.0
@@ -98,3 +98,4 @@ /** | ||
originalClassNamesValue = astUtil.extractValueFromNode(node); | ||
const range = astUtil.extractRangeFromNode(node); | ||
const rangeOffset = getOption('rangeOffset'); | ||
const range = astUtil.extractRangeFromNode(node, rangeOffset); | ||
if (node.type === 'TextAttribute') { | ||
@@ -101,0 +102,0 @@ start = range[0]; |
@@ -12,2 +12,3 @@ /** | ||
const removeDuplicatesFromArray = require('./removeDuplicatesFromArray'); | ||
const getOption = require('./settings'); | ||
@@ -172,5 +173,5 @@ /** | ||
function extractRangeFromNode(node) { | ||
function extractRangeFromNode(node, rangeOffset = 0) { | ||
if (node.type === 'TextAttribute' && node.name === 'class') { | ||
return [node.valueSpan.fullStart.offset, node.valueSpan.end.offset]; | ||
return [node.valueSpan.fullStart.offset + rangeOffset, node.valueSpan.end.offset + rangeOffset]; | ||
} | ||
@@ -177,0 +178,0 @@ switch (node.value.type) { |
@@ -21,2 +21,4 @@ 'use strict'; | ||
return ['**/*.css', '!**/node_modules', '!**/.*', '!**/dist', '!**/build']; | ||
case 'rangeOffset': | ||
return 0; | ||
case 'removeDuplicates': | ||
@@ -31,3 +33,3 @@ return true; | ||
case 'classRegex': | ||
return "^class(Name)?$" | ||
return '^class(Name)?$'; | ||
} | ||
@@ -34,0 +36,0 @@ } |
{ | ||
"name": "eslint-plugin-tailwindcss", | ||
"version": "3.10.0", | ||
"version": "3.10.1-beta.0", | ||
"description": "Rules enforcing best practices while using Tailwind CSS", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
173718
4617
1