mirror of https://github.com/gorhill/uBlock.git
Fix ESLint indentation warnings (#3800)
* Fix ESLint indentation warnings * Undo code reformatting within parentheses * Add exception for logical expressions * Update array expression rule * Disable rule for reProceduralOperator assignment * Fix indentation in static-filtering-parser.js
This commit is contained in:
parent
6b85b7f2b1
commit
3ca5e6817d
|
@ -9,7 +9,21 @@
|
|||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"indent": [ "warn", 4 ],
|
||||
"indent": [
|
||||
"warn",
|
||||
4,
|
||||
{
|
||||
"ArrayExpression": "first",
|
||||
"CallExpression": { "arguments": "first" },
|
||||
"MemberExpression": "off",
|
||||
"ObjectExpression": "off",
|
||||
"ignoreComments": true,
|
||||
"ignoredNodes": [
|
||||
"AssignmentExpression:has(Literal)",
|
||||
"LogicalExpression"
|
||||
]
|
||||
}
|
||||
],
|
||||
"getter-return": "off",
|
||||
"no-control-regex": "off",
|
||||
"no-empty": [ "error", { "allowEmptyCatch": true } ],
|
||||
|
|
|
@ -2183,30 +2183,30 @@ Parser.prototype.OPTNotSupported = OPTNotSupported;
|
|||
|
||||
const netOptionTokenDescriptors = new Map([
|
||||
[ '1p', OPTToken1p | OPTCanNegate ],
|
||||
[ 'first-party', OPTToken1p | OPTCanNegate ],
|
||||
/* synonym */ [ 'first-party', OPTToken1p | OPTCanNegate ],
|
||||
[ 'strict1p', OPTToken1pStrict ],
|
||||
[ '3p', OPTToken3p | OPTCanNegate ],
|
||||
[ 'third-party', OPTToken3p | OPTCanNegate ],
|
||||
/* synonym */ [ 'third-party', OPTToken3p | OPTCanNegate ],
|
||||
[ 'strict3p', OPTToken3pStrict ],
|
||||
[ 'all', OPTTokenAll | OPTNetworkType | OPTNonCspableType ],
|
||||
[ 'badfilter', OPTTokenBadfilter ],
|
||||
[ 'cname', OPTTokenCname | OPTAllowOnly | OPTModifierType ],
|
||||
[ 'csp', OPTTokenCsp | OPTMustAssign | OPTAllowMayAssign | OPTModifierType ],
|
||||
[ 'css', OPTTokenCss | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType | OPTNonCspableType ],
|
||||
[ 'stylesheet', OPTTokenCss | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType | OPTNonCspableType ],
|
||||
/* synonym */ [ 'stylesheet', OPTTokenCss | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType | OPTNonCspableType ],
|
||||
[ 'denyallow', OPTTokenDenyAllow | OPTMustAssign | OPTDomainList | OPTNeedDomainOpt | OPTNonCspableType ],
|
||||
[ 'doc', OPTTokenDoc | OPTNetworkType | OPTCanNegate | OPTModifiableType | OPTRedirectableType ],
|
||||
[ 'document', OPTTokenDoc | OPTNetworkType | OPTCanNegate | OPTModifiableType | OPTRedirectableType ],
|
||||
/* synonym */ [ 'document', OPTTokenDoc | OPTNetworkType | OPTCanNegate | OPTModifiableType | OPTRedirectableType ],
|
||||
[ 'domain', OPTTokenDomain | OPTMustAssign | OPTDomainList ],
|
||||
[ 'ehide', OPTTokenEhide | OPTNonNetworkType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'elemhide', OPTTokenEhide | OPTNonNetworkType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
/* synonym */ [ 'elemhide', OPTTokenEhide | OPTNonNetworkType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'empty', OPTTokenEmpty | OPTBlockOnly | OPTModifierType ],
|
||||
[ 'frame', OPTTokenFrame | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType ],
|
||||
[ 'subdocument', OPTTokenFrame | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType ],
|
||||
/* synonym */ [ 'subdocument', OPTTokenFrame | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType ],
|
||||
[ 'font', OPTTokenFont | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTNonCspableType ],
|
||||
[ 'genericblock', OPTTokenGenericblock | OPTNotSupported ],
|
||||
[ 'ghide', OPTTokenGhide | OPTNonNetworkType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'generichide', OPTTokenGhide | OPTNonNetworkType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
/* synonym */ [ 'generichide', OPTTokenGhide | OPTNonNetworkType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'header', OPTTokenHeader | OPTMustAssign | OPTAllowMayAssign | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'image', OPTTokenImage | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType | OPTNonCspableType ],
|
||||
[ 'important', OPTTokenImportant | OPTBlockOnly ],
|
||||
|
@ -2217,22 +2217,22 @@ const netOptionTokenDescriptors = new Map([
|
|||
[ 'mp4', OPTTokenMp4 | OPTNetworkType | OPTBlockOnly | OPTModifierType ],
|
||||
[ '_', OPTTokenNoop ],
|
||||
[ 'object', OPTTokenObject | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType | OPTNonCspableType ],
|
||||
[ 'object-subrequest', OPTTokenObject | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType | OPTNonCspableType ],
|
||||
/* synonym */ [ 'object-subrequest', OPTTokenObject | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType | OPTNonCspableType ],
|
||||
[ 'other', OPTTokenOther | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType | OPTNonCspableType ],
|
||||
[ 'ping', OPTTokenPing | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'beacon', OPTTokenPing | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
/* synonym */ [ 'beacon', OPTTokenPing | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'popunder', OPTTokenPopunder | OPTNonNetworkType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'popup', OPTTokenPopup | OPTNonNetworkType | OPTCanNegate | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'queryprune', OPTTokenQueryprune | OPTMayAssign | OPTModifierType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'removeparam', OPTTokenQueryprune | OPTMayAssign | OPTModifierType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
/* synonym */ [ 'removeparam', OPTTokenQueryprune | OPTMayAssign | OPTModifierType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'redirect', OPTTokenRedirect | OPTMustAssign | OPTAllowMayAssign | OPTModifierType ],
|
||||
[ 'rewrite', OPTTokenRedirect | OPTMustAssign | OPTAllowMayAssign | OPTModifierType ],
|
||||
/* synonym */ [ 'rewrite', OPTTokenRedirect | OPTMustAssign | OPTAllowMayAssign | OPTModifierType ],
|
||||
[ 'redirect-rule', OPTTokenRedirectRule | OPTMustAssign | OPTAllowMayAssign | OPTModifierType | OPTNonCspableType ],
|
||||
[ 'script', OPTTokenScript | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType | OPTNonCspableType ],
|
||||
[ 'shide', OPTTokenShide | OPTNonNetworkType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'specifichide', OPTTokenShide | OPTNonNetworkType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
/* synonym */ [ 'specifichide', OPTTokenShide | OPTNonNetworkType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
[ 'xhr', OPTTokenXhr | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType | OPTNonCspableType ],
|
||||
[ 'xmlhttprequest', OPTTokenXhr | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType | OPTNonCspableType ],
|
||||
/* synonym */ [ 'xmlhttprequest', OPTTokenXhr | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTRedirectableType | OPTNonCspableType ],
|
||||
[ 'webrtc', OPTTokenWebrtc | OPTNotSupported ],
|
||||
[ 'websocket', OPTTokenWebsocket | OPTCanNegate | OPTNetworkType | OPTModifiableType | OPTNonCspableType | OPTNonRedirectableType ],
|
||||
]);
|
||||
|
@ -2242,30 +2242,30 @@ Parser.prototype.netOptionTokenDescriptors =
|
|||
|
||||
Parser.netOptionTokenIds = new Map([
|
||||
[ '1p', OPTToken1p ],
|
||||
[ 'first-party', OPTToken1p ],
|
||||
/* synonym */ [ 'first-party', OPTToken1p ],
|
||||
[ 'strict1p', OPTToken1pStrict ],
|
||||
[ '3p', OPTToken3p ],
|
||||
[ 'third-party', OPTToken3p ],
|
||||
/* synonym */ [ 'third-party', OPTToken3p ],
|
||||
[ 'strict3p', OPTToken3pStrict ],
|
||||
[ 'all', OPTTokenAll ],
|
||||
[ 'badfilter', OPTTokenBadfilter ],
|
||||
[ 'cname', OPTTokenCname ],
|
||||
[ 'csp', OPTTokenCsp ],
|
||||
[ 'css', OPTTokenCss ],
|
||||
[ 'stylesheet', OPTTokenCss ],
|
||||
/* synonym */ [ 'stylesheet', OPTTokenCss ],
|
||||
[ 'denyallow', OPTTokenDenyAllow ],
|
||||
[ 'doc', OPTTokenDoc ],
|
||||
[ 'document', OPTTokenDoc ],
|
||||
/* synonym */ [ 'document', OPTTokenDoc ],
|
||||
[ 'domain', OPTTokenDomain ],
|
||||
[ 'ehide', OPTTokenEhide ],
|
||||
[ 'elemhide', OPTTokenEhide ],
|
||||
/* synonym */ [ 'elemhide', OPTTokenEhide ],
|
||||
[ 'empty', OPTTokenEmpty ],
|
||||
[ 'frame', OPTTokenFrame ],
|
||||
[ 'subdocument', OPTTokenFrame ],
|
||||
/* synonym */ [ 'subdocument', OPTTokenFrame ],
|
||||
[ 'font', OPTTokenFont ],
|
||||
[ 'genericblock', OPTTokenGenericblock ],
|
||||
[ 'ghide', OPTTokenGhide ],
|
||||
[ 'generichide', OPTTokenGhide ],
|
||||
/* synonym */ [ 'generichide', OPTTokenGhide ],
|
||||
[ 'header', OPTTokenHeader ],
|
||||
[ 'image', OPTTokenImage ],
|
||||
[ 'important', OPTTokenImportant ],
|
||||
|
@ -2276,22 +2276,22 @@ Parser.netOptionTokenIds = new Map([
|
|||
[ 'mp4', OPTTokenMp4 ],
|
||||
[ '_', OPTTokenNoop ],
|
||||
[ 'object', OPTTokenObject ],
|
||||
[ 'object-subrequest', OPTTokenObject ],
|
||||
/* synonym */ [ 'object-subrequest', OPTTokenObject ],
|
||||
[ 'other', OPTTokenOther ],
|
||||
[ 'ping', OPTTokenPing ],
|
||||
[ 'beacon', OPTTokenPing ],
|
||||
/* synonym */ [ 'beacon', OPTTokenPing ],
|
||||
[ 'popunder', OPTTokenPopunder ],
|
||||
[ 'popup', OPTTokenPopup ],
|
||||
[ 'queryprune', OPTTokenQueryprune ],
|
||||
[ 'removeparam', OPTTokenQueryprune ],
|
||||
/* synonym */ [ 'removeparam', OPTTokenQueryprune ],
|
||||
[ 'redirect', OPTTokenRedirect ],
|
||||
[ 'rewrite', OPTTokenRedirect ],
|
||||
/* synonym */ [ 'rewrite', OPTTokenRedirect ],
|
||||
[ 'redirect-rule', OPTTokenRedirectRule ],
|
||||
[ 'script', OPTTokenScript ],
|
||||
[ 'shide', OPTTokenShide ],
|
||||
[ 'specifichide', OPTTokenShide ],
|
||||
/* synonym */ [ 'specifichide', OPTTokenShide ],
|
||||
[ 'xhr', OPTTokenXhr ],
|
||||
[ 'xmlhttprequest', OPTTokenXhr ],
|
||||
/* synonym */ [ 'xmlhttprequest', OPTTokenXhr ],
|
||||
[ 'webrtc', OPTTokenWebrtc ],
|
||||
[ 'websocket', OPTTokenWebsocket ],
|
||||
]);
|
||||
|
|
Loading…
Reference in New Issue