stylelint-taro-rn
Version:
A collection of React Native specific rules for stylelint
18 lines (17 loc) • 603 B
JavaScript
const hasLessInterpolation = require('../utils/hasLessInterpolation');
const hasPsvInterpolation = require('../utils/hasPsvInterpolation');
const hasScssInterpolation = require('../utils/hasScssInterpolation');
/**
* Check whether a string has interpolation
*
* @param {string} string
* @return {boolean} If `true`, a string has interpolation
*/
module.exports = function (string /*: string */) /*: boolean */{
// SCSS or Less interpolation
if (hasLessInterpolation(string) || hasScssInterpolation(string) || hasPsvInterpolation(string)) {
return true;
}
return false;
};
;