3 const declarationValueIndex = require("../utils/declarationValueIndex");
4 const report = require("../utils/report");
5 const styleSearch = require("style-search");
7 module.exports = function(opts) {
8 opts.root.walkDecls(function(decl) {
9 const indexOffset = declarationValueIndex(decl);
10 const declString = decl.toString();
11 const valueString = decl.toString().slice(indexOffset);
12 if (valueString.indexOf("!") === -1) {
16 styleSearch({ source: valueString, target: "!" }, match => {
17 check(declString, match.startIndex + indexOffset, decl);
21 function check(source, index, node) {
22 opts.locationChecker({
31 ruleName: opts.checkedRuleName