Skip to content

Commit

Permalink
Revert fix lint errors?!
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed May 11, 2021
1 parent d43aa7a commit 522787a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
8 changes: 6 additions & 2 deletions src/jit/lib/setupContext.js
Expand Up @@ -689,8 +689,12 @@ export default function setupContext(configOrPath) {
})

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(
Expand Down
7 changes: 5 additions & 2 deletions src/lib/substituteClassApplyAtRules.js
Expand Up @@ -281,8 +281,11 @@ 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]
Expand Down
19 changes: 9 additions & 10 deletions src/plugins/fontVariantNumeric.js
Expand Up @@ -2,16 +2,15 @@ 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',
},
Expand Down
7 changes: 3 additions & 4 deletions tests/processPlugins.test.js
Expand Up @@ -1768,10 +1768,9 @@ 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'] } })
)

Expand Down

0 comments on commit 522787a

Please sign in to comment.