.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / utils / isAfterStandardPropertyDeclaration.js
1 /* @flow */
2 "use strict";
3
4 const _ = require("lodash");
5 const getPreviousNonSharedLineCommentNode = require("./getPreviousNonSharedLineCommentNode");
6 const isCustomProperty = require("./isCustomProperty");
7 const isStandardSyntaxDeclaration = require("./isStandardSyntaxDeclaration");
8
9 module.exports = function(node /*: postcss$node*/) /*: boolean*/ {
10   const prevNode = getPreviousNonSharedLineCommentNode(node);
11
12   return (
13     prevNode !== undefined &&
14     prevNode.type === "decl" &&
15     isStandardSyntaxDeclaration(prevNode) &&
16     !isCustomProperty(_.get(prevNode, "prop", ""))
17   );
18 };