feat: eslint + stylelint

This commit is contained in:
Liyas Thomas
2021-05-17 05:55:50 +00:00
committed by GitHub
parent 204834872e
commit 5bd53dc093
11 changed files with 5459 additions and 91 deletions

View File

@@ -17,7 +17,10 @@ const regex = { ws, sse, socketio }
// type = ws/sse/socketio
async function validator(type, url) {
console.time(`validator ${url}`)
const [res1, res2] = await Promise.all([regex[type][0].test(url), regex[type][1].test(url)])
const [res1, res2] = await Promise.all([
regex[type][0].test(url),
regex[type][1].test(url),
])
console.timeEnd(`validator ${url}`)
return res1 || res2
}