.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / utils / parseSelector.js
1 /* @flow */
2 "use strict";
3
4 const selectorParser = require("postcss-selector-parser");
5
6 module.exports = function(
7   selector /*: string*/,
8   result /*: Object*/,
9   node /*: Object*/,
10   cb /*: Function*/
11 ) {
12   try {
13     selectorParser(cb).processSync(selector);
14   } catch (e) {
15     result.warn("Cannot parse selector", { node, stylelintType: "parseError" });
16   }
17 };