Skip to content

Commit 45cad5a

Browse files
maletsdengucong3000
authored andcommitted
Resolved a few linter errors
1 parent 19b5f86 commit 45cad5a

File tree

1 file changed

+8
-32
lines changed

1 file changed

+8
-32
lines changed

parser.es6

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -381,29 +381,7 @@ class SassParser {
381381
declarationDelimiter (node) {
382382
this.raws.before += node.content
383383
}
384-
/* loop (node, parent) {
385-
const loop = postcss.rule()
386-
this.raws.comment = false
387-
this.raws.multiRule = false
388-
this.raws.loop = true
389-
loop.selector = ''
390-
loop.raws = {
391-
before: this.raws.before || DEFAULT_RAWS_RULE.before,
392-
between: DEFAULT_RAWS_RULE.between
393-
}
394-
if (this.raws.beforeMulti) {
395-
loop.raws.before += this.raws.beforeMulti
396-
this.raws.beforeMulti = undefined
397-
}
398-
node.content.forEach((contentNode, i) => {
399-
if (node.content[i + 1] && node.content[i + 1].type === 'block') {
400-
this.raws.loop = false
401-
}
402-
this.process(contentNode, loop)
403-
})
404-
parent.nodes.push(loop)
405-
this.raws.loop = false
406-
}*/
384+
407385
atkeyword (node, parent) {
408386
parent.selector += `@${ node.content }`
409387
}
@@ -421,7 +399,7 @@ class SassParser {
421399
parent.selector += node.content
422400
}
423401

424-
atrule(node, parent) {
402+
atrule (node, parent) {
425403
// Loop to find the deepest ruleset node
426404
this.raws.multiRuleProp = ''
427405

@@ -430,9 +408,7 @@ class SassParser {
430408
case 'block': {
431409
// Create Rule node
432410
const atrule = postcss.atRule()
433-
atrule.name = node.type === 'atrule'
434-
? 'media'
435-
: node.type
411+
atrule.name = node.type === 'atrule' ? 'media' : node.type
436412
atrule.nodes = []
437413

438414
// Object to store raws for Atrule
@@ -493,11 +469,11 @@ class SassParser {
493469
})
494470
}
495471

496-
mixin(node, parent) {
472+
mixin (node, parent) {
497473
this.atrule(node, parent)
498474
}
499475

500-
include(node, parent) {
476+
include (node, parent) {
501477
// Loop to find the deepest ruleset node
502478
this.raws.multiRuleProp = ''
503479

@@ -517,7 +493,7 @@ class SassParser {
517493
this.raws.comment = false
518494

519495
// create a 'selector'('atname' + atRuleRaws.afterName + 'atrule parameters') string from the node
520-
let atSelectorString = this.extractSource(
496+
const atSelectorString = this.extractSource(
521497
node.start,
522498
{
523499
line: node.content[node.content.length - 1].start.line,
@@ -546,10 +522,10 @@ class SassParser {
546522
parent.nodes.push(atrule)
547523
}
548524

549-
loop(node, parent) {
525+
loop (node, parent) {
550526
this.atrule(node, parent)
551527
}
552-
extend(node, parent) {
528+
extend (node, parent) {
553529
// Loop to find the deepest ruleset node
554530
this.raws.multiRuleProp = ''
555531

0 commit comments

Comments
 (0)