mirror of
https://github.com/quartz-community/syntax-highlighting.git
synced 2026-07-22 02:50:27 +00:00
fix: resolve ESLint and formatting issues for CI compliance
This commit is contained in:
parent
f5462c7af7
commit
3374c99008
3 changed files with 6 additions and 3 deletions
|
|
@ -18,7 +18,7 @@ document.addEventListener("nav", () => {
|
|||
button.type = "button";
|
||||
button.innerHTML = svgCopy;
|
||||
button.ariaLabel = "Copy source";
|
||||
function onClick() {
|
||||
const onClick = () => {
|
||||
navigator.clipboard.writeText(source).then(
|
||||
() => {
|
||||
button.blur();
|
||||
|
|
@ -30,7 +30,7 @@ document.addEventListener("nav", () => {
|
|||
},
|
||||
(error) => console.error(error),
|
||||
);
|
||||
}
|
||||
};
|
||||
button.addEventListener("click", onClick);
|
||||
window.addCleanup(() => button.removeEventListener("click", onClick));
|
||||
el.prepend(button);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import rehypePrettyCode from "rehype-pretty-code";
|
||||
import type { Options as CodeOptions, Theme as CodeTheme } from "rehype-pretty-code";
|
||||
import type { QuartzTransformerPlugin, JSResource, CSSResource } from "@quartz-community/types";
|
||||
// @ts-ignore
|
||||
// @ts-expect-error - inline script import handled by Quartz bundler
|
||||
import clipboardScript from "./scripts/clipboard.inline";
|
||||
import clipboardStyle from "./styles/clipboard.scss";
|
||||
|
||||
|
|
|
|||
3
types/globals.d.ts
vendored
Normal file
3
types/globals.d.ts
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
interface Window {
|
||||
addCleanup(fn: (...args: unknown[]) => void): void;
|
||||
}
|
||||
Loading…
Reference in a new issue