mirror of
https://github.com/thangisme/notes.git
synced 2025-10-14 18:04:16 -04:00
Initial commit
This commit is contained in:
32
node_modules/stylelint/lib/rules/selectorListCommaWhitespaceChecker.js
generated
vendored
Normal file
32
node_modules/stylelint/lib/rules/selectorListCommaWhitespaceChecker.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict"
|
||||
|
||||
const isStandardSyntaxRule = require("../utils/isStandardSyntaxRule")
|
||||
const report = require("../utils/report")
|
||||
const styleSearch = require("style-search")
|
||||
|
||||
module.exports = function (opts) {
|
||||
opts.root.walkRules(rule => {
|
||||
if (!isStandardSyntaxRule(rule)) {
|
||||
return
|
||||
}
|
||||
const selector = rule.selector
|
||||
styleSearch({
|
||||
source: selector,
|
||||
target: ",",
|
||||
functionArguments: "skip",
|
||||
}, match => {
|
||||
checkDelimiter(selector, match.startIndex, rule)
|
||||
})
|
||||
})
|
||||
|
||||
function checkDelimiter(source, index, node) {
|
||||
opts.locationChecker({ source, index, err: m => report({
|
||||
message: m,
|
||||
node,
|
||||
index,
|
||||
result: opts.result,
|
||||
ruleName: opts.checkedRuleName,
|
||||
}),
|
||||
})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user