TW-1192 Implement a backend for ads replacement management #73
code-quality.yml
on: pull_request
Checks if ts and lint works
6m 6s
Annotations
10 errors and 3 warnings
Checks if ts and lint works:
src/utils/selectors.min.js#L2
Replace `"use·strict";var·s={};s.isValidSelectorsGroup=function(a){if("string"!=typeof·a)throw·new·Error("s.isValidSelectorsGroup·expected·string·value,·instead·was·passed:·"+a);return""===a?!1:s._isExactMatch(s._selectors_group,a)},s.isValidSelector=function(a,b){if("string"!=typeof·a)throw·new·Error("s.isValidSelector·expected·string·value·as·its·first·argument,·instead·was·passed:·"+selectorsGroup);var·b="function"==typeof·s._isValidHtml&&b||!1;if("boolean"!=typeof·b)throw·new·Error("s.isValidSelector·expected·boolean·value·as·its·second·argument,·instead·was·passed:·"+selectorsGroup);try{switch(s.getType(a).type){case"type":if(b)return·s._isValidHtml("type",a);case"attribute":if(b)return·s._isValidHtml("attribute",a);case"universal":case"class":case"id":case"negation":return!0;case"pseudo-class":return·s._isValidCssPseudoClass(a);case"pseudo-element":return·s._isValidCssPseudoElement(a)}}catch(c){return!1}},s.quickValidation=function(a){if(!document.querySelector)throw·new·Error("This·browser·does·not·support·`document.querySelector`·which·is·used·by·`s.quickValidation`.");try{return·document.querySelector(a),!0}catch(b){return!1}},s.getType=function(a){if(!a||"string"!=typeof·a)throw·new·Error("s.getType·should·be·passed·a·non-empty·string·value,·instead·was·passed·"+a);var·b,c;if(s._isExactMatch(s._combinator,a))c="combinator";else·if(s._isExactMatch(s._type_selector,a))b=s._splitNamespaceAndName(a),c="type";else·if(s._isExactMatch(s._universal,a))b=s._splitNamespaceAndName(a),c="universal";else·if(s._isExactMatch(s._class,a))c="class";else·if(s._isExactMatch(s._HASH,a))c="id";else·if(s._isExactMatch(s._attrib,a))c="attribute";else·if(s._isExactMatch(s._negation,a))c="negation";else{if(!s._isExactMatch(s._pseudo,a))throw·new·Error("s.getType·should·be·passed·1·valid·selector,·instead·was·passed:·"+a);c=":"!==a.charAt(1)&&":first-line"!==a&&":first-letter"!==a&&":before"!==a&&":after"!==a?"pseudo-class":"pseudo-element"}return·b?{namespace:b.namespace,type:c}:{type:c}},s.getSequences=function(a){if(!a||"string"!=typeof·a)return[];var·b=[],c=a.split(",");return·c.forEach(function(a){b.push(a.trim())}),b},s.getSelectors=function(a){if(!a||"string"!=typeof·a)return[];s._r.getSelectors||(s._r.getSelectors=new·RegExp(s._negation+"|("+s._namespace_prefix+"?("+s._type_selector+"|"+s._universal+"))|"+s._HASH+"|"+s._class+"|"+s._attrib+"|::?("+s._functional_pseudo+"|"+s._ident+")|"+s._combinator,"g"));var·b=[];a.replace(s._r.getSelectors,function(a){if(a){var·c=a.trim();b.push(""==c&&a.length>0?"·":c)}return""});return·b},s.getElements=function(a){if(!a||"string"!=typeof·a)return[];var·b=[],c=-1;return·s.getSelectors(a).forEach(function(a,d){0!==d&&"combinator"!==s.getType(a).type||(c=b.push([])-1),b[c].push(a)}),b},s.getAttributeProperties=function(a){if(!a||"string"!=typeof·a)return!1;if("attribute"!==s.getType(a).type)throw·new·Error("s.getAttributeProperties·should·be·passed·1·valid·attribute·selector,·instead·was·passed·"+a);var·b,c={namespace:null,name:null,symbol:null,value:null};if(b=s._getNamespaceAndNameFromAttributeSelector(a),b.indexOf("|")>-1){var·d=s._splitNamespaceAndName(b);c.namespace=d.namespace,c.name=d.name}else·c.name=b;return·c.symbol=s._getSymbolFromAttributeSelector(a),c.value=s._getValueFromAttributeSelector(a),c},s.getPseudoProperties=function(a){if(!a||"string"!=typeof·a)return!1;var·b=s.getType(a).type;if("pseudo-class"!==b&&"pseudo-element"!==b)throw·new·Error("s.getPseudoProperties·should·be·passed·1·valid·pseudo-class·or·pseudo-element·selector,·instead·was·passed·"+a);var·c={vendor:s._getVendorPrefixFromPseudoSelector(a),name:s._getNameFromPseudoSelector(a),args:s._getArgsFromPseudoClass(a)};return":first-line"===a||":first-letter"===a||":before"===a||":after"===a?c.colons=1:"::first-line"!==a&&"::first-letter"!==a&&"::before"!==a&&"::after"!==a||(c.colons=2),c},s.getNegationInnerSelectorProperties=function(a){if(!a||"string"!=typeof·a)return!1;var·b=s.getType(a).type;if("negation"!==b)throw·new·Error("s.getNegationInnerSelectorProperties·should·be·passed·1·valid·negation·selector,·instead·was
|
Checks if ts and lint works:
src/utils/selectors.min.js#L2
Strings must use singlequote
|
Checks if ts and lint works:
src/utils/selectors.min.js#L2
Strings must use singlequote
|
Checks if ts and lint works:
src/utils/selectors.min.js#L2
Strings must use singlequote
|
Checks if ts and lint works:
src/utils/selectors.min.js#L2
Expected newline before return statement
|
Checks if ts and lint works:
src/utils/selectors.min.js#L2
Strings must use singlequote
|
Checks if ts and lint works:
src/utils/selectors.min.js#L2
Strings must use singlequote
|
Checks if ts and lint works:
src/utils/selectors.min.js#L2
Strings must use singlequote
|
Checks if ts and lint works:
src/utils/selectors.min.js#L2
Strings must use singlequote
|
Checks if ts and lint works:
src/utils/selectors.min.js#L2
Unexpected any value in conditional. An explicit comparison or type cast is required
|
Checks if ts and lint works
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Checks if ts and lint works
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-node@v2, EthanSK/git-branch-name-action@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Checks if ts and lint works:
src/index.ts#L157
Unexpected any. Specify a different type
|