.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / atRuleNameSpaceChecker.js
1 "use strict";
2
3 const isStandardSyntaxAtRule = require("../utils/isStandardSyntaxAtRule");
4 const report = require("../utils/report");
5
6 module.exports = function(options) {
7   options.root.walkAtRules(atRule => {
8     if (!isStandardSyntaxAtRule(atRule)) {
9       return;
10     }
11
12     checkColon(
13       `@${atRule.name}${atRule.raws.afterName || ""}${atRule.params}`,
14       atRule.name.length,
15       atRule
16     );
17   });
18
19   function checkColon(source, index, node) {
20     options.locationChecker({
21       source,
22       index,
23       err: m =>
24         report({
25           message: m,
26           node,
27           index,
28           result: options.result,
29           ruleName: options.checkedRuleName
30         }),
31       errTarget: `@${node.name}`
32     });
33   }
34 };