mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-04 17:07:22 +00:00
eslint: add braces rule
This commit is contained in:
parent
e0a90005e6
commit
500b156968
5 changed files with 9 additions and 5 deletions
|
|
@ -30,6 +30,10 @@ module.exports = {
|
||||||
'error',
|
'error',
|
||||||
'unix'
|
'unix'
|
||||||
],
|
],
|
||||||
|
'object-curly-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
'quotes': [
|
'quotes': [
|
||||||
'error',
|
'error',
|
||||||
'single'
|
'single'
|
||||||
|
|
|
||||||
|
|
@ -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'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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) => {
|
||||||
|
|
|
||||||
|
|
@ -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) => [
|
||||||
|
|
|
||||||
|
|
@ -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'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue