diff --git a/src/jit/lib/setupContext.js b/src/jit/lib/setupContext.js index 3ea367b8a..1d1c46f5f 100644 --- a/src/jit/lib/setupContext.js +++ b/src/jit/lib/setupContext.js @@ -690,12 +690,8 @@ function cleanupContext(context) { export default function setupContext(configOrPath, tailwindDirectives) { return (result, root) => { let sourcePath = result.opts.from - let [ - tailwindConfig, - userConfigPath, - tailwindConfigHash, - configDependencies, - ] = getTailwindConfig(configOrPath) + let [tailwindConfig, userConfigPath, tailwindConfigHash, configDependencies] = + getTailwindConfig(configOrPath) let isConfigFile = userConfigPath !== null let contextDependencies = new Set( diff --git a/src/lib/substituteClassApplyAtRules.js b/src/lib/substituteClassApplyAtRules.js index 7493da1c8..0708c7aee 100644 --- a/src/lib/substituteClassApplyAtRules.js +++ b/src/lib/substituteClassApplyAtRules.js @@ -281,11 +281,8 @@ function processApplyAtRules(css, lookupTree, config) { const nearestParentRule = findParent(applyRule, (r) => r.type === 'rule') const currentUtilityNames = extractUtilityNames(nearestParentRule.selector) - const [ - importantEntries, - applyUtilityNames, - important = importantEntries.length > 0, - ] = _.partition(applyRule.params.split(/[\s\t\n]+/g), (n) => n === '!important') + const [importantEntries, applyUtilityNames, important = importantEntries.length > 0] = + _.partition(applyRule.params.split(/[\s\t\n]+/g), (n) => n === '!important') if (_.intersection(applyUtilityNames, currentUtilityNames).length > 0) { const currentUtilityName = _.intersection(applyUtilityNames, currentUtilityNames)[0] diff --git a/src/plugins/fontVariantNumeric.js b/src/plugins/fontVariantNumeric.js index 726225f40..75f7e2c79 100644 --- a/src/plugins/fontVariantNumeric.js +++ b/src/plugins/fontVariantNumeric.js @@ -2,15 +2,16 @@ export default function () { return function ({ addUtilities, variants }) { addUtilities( { - '.ordinal, .slashed-zero, .lining-nums, .oldstyle-nums, .proportional-nums, .tabular-nums, .diagonal-fractions, .stacked-fractions': { - '--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)', - '--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)', - '--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)', - '--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)', - '--tw-numeric-fraction': 'var(--tw-empty,/*!*/ /*!*/)', - 'font-variant-numeric': - 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)', - }, + '.ordinal, .slashed-zero, .lining-nums, .oldstyle-nums, .proportional-nums, .tabular-nums, .diagonal-fractions, .stacked-fractions': + { + '--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-numeric-fraction': 'var(--tw-empty,/*!*/ /*!*/)', + 'font-variant-numeric': + 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)', + }, '.normal-nums': { 'font-variant-numeric': 'normal', }, diff --git a/tests/processPlugins.test.js b/tests/processPlugins.test.js index 9896c06a1..9bdb60224 100644 --- a/tests/processPlugins.test.js +++ b/tests/processPlugins.test.js @@ -1768,9 +1768,10 @@ test('plugins with extra options can be created using the `createPlugin.withOpti test('plugins should cache correctly', () => { const plugin = createPlugin.withOptions( - ({ className = 'banana' } = {}) => ({ addComponents, variants }) => { - addComponents({ [`.${className}`]: { position: 'absolute' } }, variants('testPlugin')) - }, + ({ className = 'banana' } = {}) => + ({ addComponents, variants }) => { + addComponents({ [`.${className}`]: { position: 'absolute' } }, variants('testPlugin')) + }, () => ({ variants: { testPlugin: ['responsive'] } }) )