Skip to content

Commit c2dccc6

Browse files
Linting
1 parent d5a34fc commit c2dccc6

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ const postcssExtendRule = (rawopts) => {
99
const opts = Object(rawopts);
1010
const extendMatch = opts.name instanceof RegExp
1111
? opts.name
12-
: 'name' in opts
13-
? new RegExp(`^${opts.name}$`, 'i')
14-
: 'extend';
12+
: 'name' in opts
13+
? new RegExp(`^${opts.name}$`, 'i')
14+
: 'extend';
1515

1616
return {
1717
postcssPlugin: 'postcss-extend-rule',
@@ -88,7 +88,7 @@ const postcssExtendRule = (rawopts) => {
8888
functionalRule.remove();
8989
}
9090
});
91-
}
91+
},
9292
};
9393
};
9494

@@ -100,9 +100,9 @@ function getExtendingRules(selectorIdMatch, extendAtRule) {
100100
extendAtRule.root().walkRules(selectorIdMatch, matchingRule => {
101101
// nesting selectors for the selectors matching the selector identifier
102102
const nestingSelectors = matchingRule.selectors.filter(
103-
selector => selectorIdMatch.test(selector)
103+
selector => selectorIdMatch.test(selector),
104104
).map(
105-
selector => selector.replace(selectorIdMatch, '$1&$3')
105+
selector => selector.replace(selectorIdMatch, '$1&$3'),
106106
).join(',');
107107

108108
// matching rule’s cloned nodes
@@ -114,7 +114,7 @@ function getExtendingRules(selectorIdMatch, extendAtRule) {
114114
params: nestingSelectors,
115115
nodes: nestingNodes,
116116
// empty the extending rules, as they are likely non-conforming
117-
raws: {}
117+
raws: {},
118118
});
119119

120120
// preserve nesting of parent rules and at-rules
@@ -137,7 +137,7 @@ function getExtendingRules(selectorIdMatch, extendAtRule) {
137137
function getSelectorIdMatch(selectorIds, postcss) {
138138
// escape the contents of the selector id to avoid being parsed as regex
139139
const escapedSelectorIds = postcss.list.comma(selectorIds).map(
140-
selectorId => selectorId.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
140+
selectorId => selectorId.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'),
141141
).join('|');
142142

143143
// selector unattached to an existing selector

0 commit comments

Comments
 (0)