3 const isStandardSyntaxRule = require("../utils/isStandardSyntaxRule");
4 const parseSelector = require("../utils/parseSelector");
5 const report = require("../utils/report");
6 const styleSearch = require("style-search");
8 module.exports = function(options) {
9 options.root.walkRules(rule => {
10 if (!isStandardSyntaxRule(rule)) {
14 rule.selector.indexOf("[") === -1 ||
15 rule.selector.indexOf("=") === -1
20 parseSelector(rule.selector, options.result, rule, selectorTree => {
21 selectorTree.walkAttributes(attributeNode => {
22 const operator = attributeNode.operator;
28 const attributeNodeString = attributeNode.toString();
31 { source: attributeNodeString, target: operator },
33 const index = options.checkBeforeOperator
40 attributeNode.sourceIndex,
48 function checkOperator(source, index, node, attributeIndex, operator) {
49 options.locationChecker({
55 options.checkBeforeOperator
57 : operator[operator.length - 1],
61 index: attributeIndex + index,
62 result: options.result,
63 ruleName: options.checkedRuleName