Fix linting issues

main
Elbert Alias 4 years ago
parent 0cf31bbe50
commit 479b424695

@ -6,19 +6,11 @@ const http = require('http')
const https = require('https') const https = require('https')
const Wappalyzer = require('./wappalyzer') const Wappalyzer = require('./wappalyzer')
const { const { setTechnologies, setCategories, analyze, analyzeManyToMany, resolve } =
setTechnologies, Wappalyzer
setCategories,
analyze, const { AWS_LAMBDA_FUNCTION_NAME, CHROMIUM_BIN, CHROMIUM_DATA_DIR } =
analyzeManyToMany, process.env
resolve,
} = Wappalyzer
const {
AWS_LAMBDA_FUNCTION_NAME,
CHROMIUM_BIN,
CHROMIUM_DATA_DIR,
} = process.env
let puppeteer let puppeteer
let chromiumArgs = [ let chromiumArgs = [
@ -702,19 +694,14 @@ class Site {
const domain = url.hostname.replace(/^www\./, '') const domain = url.hostname.replace(/^www\./, '')
;[ ;[records.cname, records.ns, records.mx, records.txt, records.soa] =
records.cname, await Promise.all([
records.ns, resolve(dns.resolveCname, url.hostname),
records.mx, resolve(dns.resolveNs, domain),
records.txt, resolve(dns.resolveMx, domain),
records.soa, resolve(dns.resolveTxt, domain),
] = await Promise.all([ resolve(dns.resolveSoa, domain),
resolve(dns.resolveCname, url.hostname), ])
resolve(dns.resolveNs, domain),
resolve(dns.resolveMx, domain),
resolve(dns.resolveTxt, domain),
resolve(dns.resolveSoa, domain),
])
this.dns = Object.keys(records).reduce((dns, type) => { this.dns = Object.keys(records).reduce((dns, type) => {
dns[type] = dns[type] || [] dns[type] = dns[type] || []

@ -14,7 +14,8 @@ const { agent, promisify, getOption, setOption, open, globEscape } = Utils
const expiry = 1000 * 60 * 60 * 24 const expiry = 1000 * 60 * 60 * 24
const hostnameIgnoreList = /((local|dev(elop(ment)?)?|stag(e|ing)?|preprod|preview|test(ing)?|[^a-z]demo(shop)?|admin|cache)[.-]|localhost|wappalyzer|google|facebook|twitter|reddit|yahoo|wikipedia|amazon|youtube|\/admin|\.local|\.test|\.dev|\.netlify\.app|\.shopifypreview\.com|^[0-9.]+$)/ const hostnameIgnoreList =
/((local|dev(elop(ment)?)?|stag(e|ing)?|preprod|preview|test(ing)?|[^a-z]demo(shop)?|admin|cache)[.-]|localhost|wappalyzer|google|facebook|twitter|reddit|yahoo|wikipedia|amazon|youtube|\/admin|\.local|\.test|\.dev|\.netlify\.app|\.shopifypreview\.com|^[0-9.]+$)/
const xhrDebounce = [] const xhrDebounce = []
@ -712,9 +713,8 @@ const Driver = {
const hostnames = Object.keys(Driver.cache.hostnames).reduce( const hostnames = Object.keys(Driver.cache.hostnames).reduce(
(hostnames, hostname) => { (hostnames, hostname) => {
// eslint-disable-next-line standard/computed-property-even-spacing // eslint-disable-next-line standard/computed-property-even-spacing
const { url, language, detections, hits } = Driver.cache.hostnames[ const { url, language, detections, hits } =
hostname Driver.cache.hostnames[hostname]
]
if (!hostnameIgnoreList.test(hostname) && hits >= 3) { if (!hostnameIgnoreList.test(hostname) && hits >= 3) {
hostnames[url] = hostnames[url] || { hostnames[url] = hostnames[url] || {

@ -2,15 +2,8 @@
/* eslint-env browser */ /* eslint-env browser */
/* globals chrome, Utils */ /* globals chrome, Utils */
const { const { agent, open, i18n, getOption, setOption, promisify, sendMessage } =
agent, Utils
open,
i18n,
getOption,
setOption,
promisify,
sendMessage,
} = Utils
function setDisabledDomain(enabled) { function setDisabledDomain(enabled) {
if (enabled) { if (enabled) {