From 95df3522a15631abc51a4295cae0ea401a8d4e1e Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Tue, 14 Sep 2021 19:58:52 +0200 Subject: feat: add eslint-plugin-unicorn (#1936) --- src/webview/darkmode.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/webview/darkmode.ts') diff --git a/src/webview/darkmode.ts b/src/webview/darkmode.ts index e06c22f11..7b9407049 100644 --- a/src/webview/darkmode.ts +++ b/src/webview/darkmode.ts @@ -1,5 +1,3 @@ -/* eslint no-bitwise: ["error", { "int32Hint": true }] */ - import { join } from 'path'; import { pathExistsSync, readFileSync } from 'fs-extra'; @@ -7,7 +5,9 @@ const debug = require('debug')('Ferdi:DarkMode'); const chars = [...'abcdefghijklmnopqrstuvwxyz']; -const ID = [...Array(20)].map(() => chars[Math.random() * chars.length | 0]).join(''); +const ID = [...Array.from({ length: 20 })] + .map(() => chars[Math.trunc(Math.random() * chars.length)]) + .join(''); export function injectDarkModeStyle(recipePath: string) { const darkModeStyle = join(recipePath, 'darkmode.css'); -- cgit v1.2.3-70-g09d2