From c5d273eb01f0fa84c2d349f0e35060b3133a2950 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 13 Jul 2026 17:41:20 +0300 Subject: [PATCH] lint --- .../palette_editor/palette_editor.vue | 10 ++++--- src/components/rich_content/rich_content.jsx | 27 ++++++++----------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/components/palette_editor/palette_editor.vue b/src/components/palette_editor/palette_editor.vue index b27b21f00..508b83f87 100644 --- a/src/components/palette_editor/palette_editor.vue +++ b/src/components/palette_editor/palette_editor.vue @@ -20,7 +20,9 @@ :show-ratio="true" :contrast="contrast[key]" /> -
{{ ' ' }}
+
+ {{ ' ' }} +
@@ -59,10 +61,12 @@ import { computed } from 'vue' import ColorInput from 'src/components/color_input/color_input.vue' import ContrastRatio from 'src/components/contrast_ratio/contrast_ratio.vue' -import { getContrastRatio, hex2rgb } from 'src/services/color_convert/color_convert.js' - import { useInterfaceStore } from 'src/stores/interface.js' +import { + getContrastRatio, + hex2rgb, +} from 'src/services/color_convert/color_convert.js' import { newExporter, newImporter, diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx index 990497007..432250548 100644 --- a/src/components/rich_content/rich_content.jsx +++ b/src/components/rich_content/rich_content.jsx @@ -334,9 +334,11 @@ export default { 'mfm', this.pauseMfm ? '-pause' : '', this.scaleMfm ? '-scale' : '', - ].filter(x => x).join(' ') + ] + .filter((x) => x) + .join(' ') newAttrs['data-mfm-operator'] = mfmOperator - switch(mfmOperator) { + switch (mfmOperator) { case 'position': { const x = Number.parseFloat(fullAttrs['data-mfm-x']) || 0 const y = Number.parseFloat(fullAttrs['data-mfm-y']) || 0 @@ -350,10 +352,7 @@ export default { case 'scale': { const x = Number.parseFloat(fullAttrs['data-mfm-x']) || 1 const y = Number.parseFloat(fullAttrs['data-mfm-y']) || 1 - newAttrs.style = [ - 'transform:', - `scale(${x}, ${y})`, - ].join(' ') + newAttrs.style = ['transform:', `scale(${x}, ${y})`].join(' ') break } case 'rotate': { @@ -366,16 +365,12 @@ export default { } case 'bg': { const color = fullAttrs['data-mfm-color'] || 0 - newAttrs.style = [ - `background-color: #${color}`, - ].join(' ') + newAttrs.style = [`background-color: #${color}`].join(' ') break } case 'fg': { const color = fullAttrs['data-mfm-color'] || 0 - newAttrs.style = [ - `color: #${color}`, - ].join(';') + newAttrs.style = [`color: #${color}`].join(';') break } case 'spin': { @@ -389,14 +384,14 @@ export default { const anim = [ x ? 'mfm-spinX' : null, y ? 'mfm-spinY' : null, - 'mfm-spin' - ].filter(a => a)[0] + 'mfm-spin', + ].filter((a) => a)[0] const direction = [ alternate ? 'alternate' : null, left ? 'reverse' : null, 'normal', - ].filter(a => a)[0] + ].filter((a) => a)[0] newAttrs.style = [ `animation-name: ${anim}`, @@ -423,7 +418,7 @@ export default { newAttrs.style = [ `border: ${width} ${style} ${color}`, `border-radius: ${radius}`, - `overflow: ${noclip ? 'visible' : 'clip'}` + `overflow: ${noclip ? 'visible' : 'clip'}`, ].join(';') break }