mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-16 15:33:38 +01:00
Address eslint warnings
This commit is contained in:
parent
3360d3e3e1
commit
0a048eb64e
@ -19,19 +19,17 @@
|
|||||||
Home: https://github.com/gorhill/uBlock
|
Home: https://github.com/gorhill/uBlock
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import * as makeScriptlet from './make-scriptlets.js';
|
||||||
|
import * as sfp from './js/static-filtering-parser.js';
|
||||||
|
|
||||||
/******************************************************************************/
|
import { createHash, randomBytes } from 'crypto';
|
||||||
|
|
||||||
|
import { dnrRulesetFromRawLists } from './js/static-dnr-filtering.js';
|
||||||
import fs from 'fs/promises';
|
import fs from 'fs/promises';
|
||||||
import https from 'https';
|
import https from 'https';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import process from 'process';
|
import process from 'process';
|
||||||
import { createHash, randomBytes } from 'crypto';
|
|
||||||
import redirectResourcesMap from './js/redirect-resources.js';
|
import redirectResourcesMap from './js/redirect-resources.js';
|
||||||
import { dnrRulesetFromRawLists } from './js/static-dnr-filtering.js';
|
|
||||||
import * as sfp from './js/static-filtering-parser.js';
|
|
||||||
import * as makeScriptlet from './make-scriptlets.js';
|
|
||||||
import { safeReplace } from './safe-replace.js';
|
import { safeReplace } from './safe-replace.js';
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
@ -106,8 +104,7 @@ const log = (text, silent = false) => {
|
|||||||
const urlToFileName = url => {
|
const urlToFileName = url => {
|
||||||
return url
|
return url
|
||||||
.replace(/^https?:\/\//, '')
|
.replace(/^https?:\/\//, '')
|
||||||
.replace(/\//g, '_')
|
.replace(/\//g, '_');
|
||||||
;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchText = (url, cacheDir) => {
|
const fetchText = (url, cacheDir) => {
|
||||||
@ -365,8 +362,7 @@ async function processNetworkFilters(assetDetails, network) {
|
|||||||
log(plainGood
|
log(plainGood
|
||||||
.filter(rule => Array.isArray(rule._warning))
|
.filter(rule => Array.isArray(rule._warning))
|
||||||
.map(rule => rule._warning.map(v => `\t\t${v}`))
|
.map(rule => rule._warning.map(v => `\t\t${v}`))
|
||||||
.join('\n'),
|
.join('\n'), true
|
||||||
true
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const regexes = rules.filter(rule => isGood(rule) && isRegex(rule));
|
const regexes = rules.filter(rule => isGood(rule) && isRegex(rule));
|
||||||
|
Loading…
Reference in New Issue
Block a user