.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / utils / isStandardSyntaxProperty.js
1 /* @flow */
2 "use strict";
3
4 const _ = require("lodash");
5 const hasInterpolation = require("../utils/hasInterpolation");
6 /**
7  * Check whether a property is standard
8  */
9 module.exports = function(property /*: string*/) /*: boolean*/ {
10   // SCSS var (e.g. $var: x), list (e.g. $list: (x)) or map (e.g. $map: (key:value))
11   if (property[0] === "$") {
12     return false;
13   }
14
15   // Less var (e.g. @var: x)
16   if (property[0] === "@") {
17     return false;
18   }
19
20   // Less append property value with space (e.g. transform+_: scale(2))
21   if (_.endsWith(property, "+") || _.endsWith(property, "+_")) {
22     return false;
23   }
24
25   // SCSS or Less interpolation
26   if (hasInterpolation(property)) {
27     return false;
28   }
29
30   return true;
31 };