Skip to content

Commit 2feac44

Browse files
committed
Style fixes
1 parent ac80992 commit 2feac44

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

__tests__/processPlugins.test.js

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,18 @@ test('plugins can create utilities', () => {
1010
const [components, utilities] = processPlugins({
1111
plugins: [
1212
function({ rule, addUtilities }) {
13-
addUtilities(
14-
[
15-
rule('.object-fill', {
16-
'object-fit': 'fill',
17-
}),
18-
rule('.object-contain', {
19-
'object-fit': 'contain',
20-
}),
21-
rule('.object-cover', {
22-
'object-fit': 'cover',
23-
}),
13+
addUtilities([
14+
rule('.object-fill', {
15+
'object-fit': 'fill',
16+
}),
17+
rule('.object-contain', {
18+
'object-fit': 'contain',
19+
}),
20+
rule('.object-cover', {
21+
'object-fit': 'cover',
22+
}),
2423
])
25-
}
24+
},
2625
],
2726
})
2827

@@ -57,8 +56,10 @@ test('plugins can create utilities with variants', () => {
5756
rule('.object-cover', {
5857
'object-fit': 'cover',
5958
}),
60-
], ['responsive', 'hover', 'group-hover', 'focus'])
61-
}
59+
],
60+
['responsive', 'hover', 'group-hover', 'focus']
61+
)
62+
},
6263
],
6364
})
6465

@@ -93,7 +94,7 @@ test('plugins can create components', () => {
9394
'background-color': 'darkblue',
9495
}),
9596
])
96-
}
97+
},
9798
],
9899
})
99100

@@ -135,7 +136,7 @@ test('plugins can create components with media queries', () => {
135136
}),
136137
]),
137138
])
138-
}
139+
},
139140
],
140141
})
141142

@@ -418,7 +419,7 @@ test("plugins can apply the user's chosen prefix", () => {
418419
`)
419420
})
420421

421-
test("utilities are escaped and automatically respect prefix and important options when created via `utility`", () => {
422+
test('utilities are escaped and automatically respect prefix and important options when created via `utility`', () => {
422423
const [, utilities] = processPlugins({
423424
plugins: [
424425
function({ utility, addUtilities }) {

src/util/processPlugins.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ function defineUtility(selector, properties, options) {
2020
return defineUtility(selector.slice(1), properties, options)
2121
}
2222

23-
const rule = defineRule(prefixSelector(options.prefix, `.${escapeClassName(selector)}`), properties)
23+
const rule = defineRule(
24+
prefixSelector(options.prefix, `.${escapeClassName(selector)}`),
25+
properties
26+
)
2427

2528
if (options.important) {
2629
rule.walkDecls(decl => (decl.important = true))

0 commit comments

Comments
 (0)