chore: ESLint Flat Config (#834)

* chore: eslint flat config

* chore: format

* update according to review

* chore: remove prettier config and format

* fix: move handler to script to bypass eslint

* chore: config eslint for lang=js block

* docs: add surrounding empty lines for code block

* chore: also minify css in csp build

* chore: publint
This commit is contained in:
Yue JIN
2025-05-26 11:11:23 +08:00
committed by GU Yiling
parent 8fbc68a010
commit d3bff26307
50 changed files with 1020 additions and 1061 deletions

View File

@ -23,7 +23,7 @@ use([CanvasRenderer, SVGRenderer]);
const params = useUrlSearchParams();
const initOptions = computed(() => ({
renderer: params.renderer || "canvas"
renderer: params.renderer || "canvas",
}));
provide(INIT_OPTIONS_KEY, initOptions);
@ -39,7 +39,7 @@ function openCodegen() {
track("codegen", { from: "click" });
}
watch(codeOpen, open => {
watch(codeOpen, (open) => {
if (open) {
location.hash = "#codegen";
} else {
@ -94,7 +94,7 @@ watch(codeOpen, open => {
<aside class="renderer">
<button
:class="{
active: initOptions.renderer === 'canvas'
active: initOptions.renderer === 'canvas',
}"
@click="params.renderer = 'canvas'"
>
@ -102,7 +102,7 @@ watch(codeOpen, open => {
</button>
<button
:class="{
active: initOptions.renderer === 'svg'
active: initOptions.renderer === 'svg',
}"
@click="params.renderer = 'svg'"
>
@ -237,8 +237,9 @@ pre {
pre,
code,
textarea {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
"Liberation Mono", monospace;
font-family:
ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
monospace;
}
footer {