X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Fstylelint%2Flib%2Futils%2FnextNonCommentNode.js;fp=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Fstylelint%2Flib%2Futils%2FnextNonCommentNode.js;h=411ee32de73a8ef2f4f08931ec7326e0d29472b7;hb=3aba54c891969552833dbc350b3139e944e17a97;hp=0000000000000000000000000000000000000000;hpb=1def8ecce8e6f3aa32e6978d0ba7846a99b8de34;p=dotfiles%2F.git diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/utils/nextNonCommentNode.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/utils/nextNonCommentNode.js new file mode 100644 index 00000000..411ee32d --- /dev/null +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/utils/nextNonCommentNode.js @@ -0,0 +1,18 @@ +/* @flow */ +"use strict"; + +/** + * Get the next non-comment node in a PostCSS AST + * at or after a given node. + */ +module.exports = function nextNonCommentNode( + startNode /*: Object*/ +) /*: ?Object*/ { + if (!startNode || !startNode.next) return null; + + if (startNode.type === "comment") { + return nextNonCommentNode(startNode.next()); + } + + return startNode; +};