eslint: add braces rule

This commit is contained in:
He4eT 2023-06-05 00:51:41 +03:00 committed by Alexey
commit 500b156968
5 changed files with 9 additions and 5 deletions

View file

@ -30,6 +30,10 @@ module.exports = {
'error', 'error',
'unix' 'unix'
], ],
'object-curly-spacing': [
'error',
'always'
],
'quotes': [ 'quotes': [
'error', 'error',
'single' 'single'

View file

@ -52,10 +52,10 @@ export default function GridBuffer ({ inbox, currentWindow }) {
const isEmpty = const isEmpty =
rawMessagesContent rawMessagesContent
.map(({text}) => text.length) .map(({ text }) => text.length)
.every((l) => l === 0) .every((l) => l === 0)
const getGridStyle = ({style}) => { const getGridStyle = ({ style }) => {
if (['alert', 'normal'].includes(style)) return 'grid' if (['alert', 'normal'].includes(style)) return 'grid'
return style || 'grid' return style || 'grid'
} }

View file

@ -5,7 +5,7 @@ import {
const windowLocation = () => const windowLocation = () =>
window.location.hash.replace('#', '') || '/' window.location.hash.replace('#', '') || '/'
export const buildPlayLinkHref = ({url}) => export const buildPlayLinkHref = ({ url }) =>
`/#/play/${encodeURIComponent(url)}` `/#/play/${encodeURIComponent(url)}`
export const extractView = (location) => { export const extractView = (location) => {

View file

@ -8,7 +8,7 @@ const monkeyTypesThemes = [
.sort((a, b) => a.name.localeCompare(b.name)) .sort((a, b) => a.name.localeCompare(b.name))
const names = monkeyTypesThemes const names = monkeyTypesThemes
.map(({name}) => `'${name}',`).join('\n') .map(({ name }) => `'${name}',`).join('\n')
const css = monkeyTypesThemes const css = monkeyTypesThemes
.map((theme) => [ .map((theme) => [

View file

@ -1,6 +1,6 @@
import { useState } from 'preact/hooks' import { useState } from 'preact/hooks'
import {themes} from './themeList.js' import { themes } from './themeList.js'
import './themes.css' import './themes.css'
const LS_THEME_KEY = 'elseifplayer/theme' const LS_THEME_KEY = 'elseifplayer/theme'