diff --git a/.eslintrc.js b/.eslintrc.js index 5eb542d..a31438b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -30,6 +30,10 @@ module.exports = { 'error', 'unix' ], + 'object-curly-spacing': [ + 'error', + 'always' + ], 'quotes': [ 'error', 'single' diff --git a/src/components/Player/OutputBox/GridBuffer.jsx b/src/components/Player/OutputBox/GridBuffer.jsx index 121f9e2..5051719 100644 --- a/src/components/Player/OutputBox/GridBuffer.jsx +++ b/src/components/Player/OutputBox/GridBuffer.jsx @@ -52,10 +52,10 @@ export default function GridBuffer ({ inbox, currentWindow }) { const isEmpty = rawMessagesContent - .map(({text}) => text.length) + .map(({ text }) => text.length) .every((l) => l === 0) - const getGridStyle = ({style}) => { + const getGridStyle = ({ style }) => { if (['alert', 'normal'].includes(style)) return 'grid' return style || 'grid' } diff --git a/src/routing.js b/src/routing.js index 315b64b..3ee550e 100644 --- a/src/routing.js +++ b/src/routing.js @@ -5,7 +5,7 @@ import { const windowLocation = () => window.location.hash.replace('#', '') || '/' -export const buildPlayLinkHref = ({url}) => +export const buildPlayLinkHref = ({ url }) => `/#/play/${encodeURIComponent(url)}` export const extractView = (location) => { diff --git a/src/themes/_generator.js b/src/themes/_generator.js index ac396db..94f4ed7 100644 --- a/src/themes/_generator.js +++ b/src/themes/_generator.js @@ -8,7 +8,7 @@ const monkeyTypesThemes = [ .sort((a, b) => a.name.localeCompare(b.name)) const names = monkeyTypesThemes - .map(({name}) => `'${name}',`).join('\n') + .map(({ name }) => `'${name}',`).join('\n') const css = monkeyTypesThemes .map((theme) => [ diff --git a/src/themes/themes.js b/src/themes/themes.js index a287f2c..8bc1ad6 100644 --- a/src/themes/themes.js +++ b/src/themes/themes.js @@ -1,6 +1,6 @@ import { useState } from 'preact/hooks' -import {themes} from './themeList.js' +import { themes } from './themeList.js' import './themes.css' const LS_THEME_KEY = 'elseifplayer/theme'