@glideapps/prettier-plugin-glide-tailwind
Advanced tools
Comparing version 2.2.14 to 2.2.15
@@ -1,2 +0,2 @@ | ||
import type TWClassesSorter from 'tailwind-classes-sorter'; | ||
import type TWClassesSorter from "tailwind-classes-sorter"; | ||
export default function updateOptions(twClassesSorter: TWClassesSorter, options: any): void; |
@@ -8,9 +8,11 @@ "use strict"; | ||
function updateOptions(twClassesSorter, options) { | ||
if (typeof options === 'undefined') { | ||
if (typeof options === "undefined") { | ||
return; | ||
} | ||
twClassesSorter.classesPosition = options.twClassesPosition || 'components-first'; | ||
twClassesSorter.unknownClassesPosition = options.twUnknownClassesPosition || 'start'; | ||
twClassesSorter.classesPosition = options.twClassesPosition || "components-first"; | ||
twClassesSorter.unknownClassesPosition = options.twUnknownClassesPosition || "start"; | ||
if (options.twConfig) { | ||
twClassesSorter.setConfig(path_1.default.join(__dirname, '../..', options.twConfig)); | ||
// Swap in the commented one to get tests working | ||
// twClassesSorter.setConfig(path.join(__dirname, "../..", options.twConfig)); | ||
twClassesSorter.setConfig(path_1.default.join(__dirname, "../../../..", options.twConfig)); | ||
} | ||
@@ -20,7 +22,7 @@ else { | ||
} | ||
twClassesSorter.setPluginOrder((defaultOrder) => { | ||
const customOrder = options.twPluginsOrder.split(','); | ||
return [...customOrder, ...defaultOrder.filter((plugin) => !customOrder.includes(plugin))]; | ||
twClassesSorter.setPluginOrder(defaultOrder => { | ||
const customOrder = options.twPluginsOrder.split(","); | ||
return [...customOrder, ...defaultOrder.filter(plugin => !customOrder.includes(plugin))]; | ||
}); | ||
} | ||
exports.default = updateOptions; |
{ | ||
"name": "@glideapps/prettier-plugin-glide-tailwind", | ||
"version": "2.2.14", | ||
"version": "2.2.15", | ||
"description": "Formatting and sorting for glide tailwind classes", | ||
@@ -5,0 +5,0 @@ "author": "Original author - Ari Seyhun | Modified by Bry Nguyen", |
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
72837
1118