.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / utils / nextNonCommentNode.js
1 /* @flow */
2 "use strict";
3
4 /**
5  * Get the next non-comment node in a PostCSS AST
6  * at or after a given node.
7  */
8 module.exports = function nextNonCommentNode(
9   startNode /*: Object*/
10 ) /*: ?Object*/ {
11   if (!startNode || !startNode.next) return null;
12
13   if (startNode.type === "comment") {
14     return nextNonCommentNode(startNode.next());
15   }
16
17   return startNode;
18 };