double qutes eslint rule

This commit is contained in:
tmshv committed 2022-09-06 14:52:56 +03:00
1 parent 2e517cc7f7
commit 85bc8c4af5
57 files changed
+370 -366

No files matched your search

+3 -3
View File
@@ -1,5 +1,5 @@
import format from 'date-fns/format'
import { ru } from 'date-fns/locale'
import format from "date-fns/format"
import { ru } from "date-fns/locale"
/**
*
@@ -8,7 +8,7 @@ import { ru } from 'date-fns/locale'
* @param date
*/
export const dateFormat = (date: string | Date) => {
const value = typeof date === 'string' ? new Date(date) : date
const value = typeof date === "string" ? new Date(date) : date
return format(value, "d MMMM yyyy", {
locale: ru,
})
+5 -5
View File
@@ -1,9 +1,9 @@
const units = ['байт', 'КБ', 'МБ', 'ГБ', 'ТБ', 'ПБ']
const units = ["байт", "КБ", "МБ", "ГБ", "ТБ", "ПБ"]
const mime = new Map([
['application/pdf', 'ПДФ'],
['image/jpeg', 'ЖПГ'],
['image/png', 'ПНГ'],
["application/pdf", "ПДФ"],
["image/jpeg", "ЖПГ"],
["image/png", "ПНГ"],
])
export function ext(mimeType: string): string {
@@ -15,7 +15,7 @@ export function ext(mimeType: string): string {
}
export function size(bytes: any, precision = 1): string {
if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return ''
if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return ""
const number = Math.floor(Math.log(bytes) / Math.log(1024))
const size = (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision)
+12 -12
View File
@@ -1,23 +1,23 @@
import { IMeta, Pic } from 'src/types'
import { IMeta, Pic } from "src/types"
export function meta(props: Partial<IMeta>): IMeta {
const path = props.url || '/'
const path = props.url || "/"
const url = `https://art.shlisselburg.org${path}`
return {
title: 'Шлиссельбургская ДХШ',
description: 'Сайт Шлиссельбургской художественной школы',
image: 'https://art.shlisselburg.org/entrance.jpg',
title: "Шлиссельбургская ДХШ",
description: "Сайт Шлиссельбургской художественной школы",
image: "https://art.shlisselburg.org/entrance.jpg",
imageWidth: 1200,
imageHeight: 630,
siteName: 'Шлиссельбургская Детская Художественная Школа',
locale: 'ru_RU',
type: 'website',
domain: 'art.shlisselburg.org',
twitterCard: 'summary_large_image',
twitterSite: '@',
twitterCreator: '@tmshv',
siteName: "Шлиссельбургская Детская Художественная Школа",
locale: "ru_RU",
type: "website",
domain: "art.shlisselburg.org",
twitterCard: "summary_large_image",
twitterSite: "@",
twitterCreator: "@tmshv",
...props,
url,
+3 -3
View File
@@ -1,7 +1,7 @@
import MarkdownIt from 'markdown-it'
import Typograf from 'typograf'
import MarkdownIt from "markdown-it"
import Typograf from "typograf"
const tp = new Typograf({ locale: ['ru'] })
const tp = new Typograf({ locale: ["ru"] })
const md = new MarkdownIt({
html: true,
})
+2 -2
View File
@@ -4,10 +4,10 @@ export function isPartOfPath(part: string, path: string): boolean {
export function queryList(key: string, values: string[]): string {
if (values.length === 0) {
return ''
return ""
}
return values
.map(value => `${key}=${value}`)
.join('&')
.join("&")
}