X-Git-Url: https://git.josue.xyz/?p=dotfiles%2F.git;a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Fstylelint%2Flib%2Frules%2FselectorAttributeOperatorSpaceChecker.js;fp=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Fstylelint%2Flib%2Frules%2FselectorAttributeOperatorSpaceChecker.js;h=0000000000000000000000000000000000000000;hp=a72607552fb932d37d070ee6724829cf3c881584;hb=3ddadb3c98564791f0ac36cb39771d844a63dc91;hpb=5f797af6612ed10887189b47a1efc2f915586e59 diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/rules/selectorAttributeOperatorSpaceChecker.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/rules/selectorAttributeOperatorSpaceChecker.js deleted file mode 100644 index a7260755..00000000 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/rules/selectorAttributeOperatorSpaceChecker.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; - -const isStandardSyntaxRule = require("../utils/isStandardSyntaxRule"); -const parseSelector = require("../utils/parseSelector"); -const report = require("../utils/report"); -const styleSearch = require("style-search"); - -module.exports = function(options) { - options.root.walkRules(rule => { - if (!isStandardSyntaxRule(rule)) { - return; - } - if ( - rule.selector.indexOf("[") === -1 || - rule.selector.indexOf("=") === -1 - ) { - return; - } - - parseSelector(rule.selector, options.result, rule, selectorTree => { - selectorTree.walkAttributes(attributeNode => { - const operator = attributeNode.operator; - - if (!operator) { - return; - } - - const attributeNodeString = attributeNode.toString(); - - styleSearch( - { source: attributeNodeString, target: operator }, - match => { - const index = options.checkBeforeOperator - ? match.startIndex - : match.endIndex - 1; - checkOperator( - attributeNodeString, - index, - rule, - attributeNode.sourceIndex, - operator - ); - } - ); - }); - }); - - function checkOperator(source, index, node, attributeIndex, operator) { - options.locationChecker({ - source, - index, - err: m => - report({ - message: m.replace( - options.checkBeforeOperator - ? operator[0] - : operator[operator.length - 1], - operator - ), - node, - index: attributeIndex + index, - result: options.result, - ruleName: options.checkedRuleName - }) - }); - } - }); -};