mirror of
https://github.com/quartz-community/note-properties.git
synced 2026-07-22 02:50:26 +00:00
fix: resolve ESLint and formatting issues for CI compliance
This commit is contained in:
parent
2f0e1914ee
commit
020317124e
4 changed files with 9 additions and 9 deletions
|
|
@ -7,7 +7,7 @@ import { classNames } from "../util/lang";
|
|||
import { resolveRelative } from "../util/path";
|
||||
import { i18n } from "../i18n";
|
||||
import style from "./styles/noteProperties.scss";
|
||||
// @ts-ignore
|
||||
// @ts-expect-error - inline script import handled by Quartz bundler
|
||||
import script from "./scripts/noteProperties.inline.ts";
|
||||
|
||||
export interface NotePropertiesComponentOptions {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
// @ts-nocheck
|
||||
|
||||
const STORAGE_KEY = "note-properties-collapsed";
|
||||
|
||||
function init() {
|
||||
const details = document.querySelector("details.note-properties");
|
||||
const details = document.querySelector<HTMLDetailsElement>("details.note-properties");
|
||||
if (!details) return;
|
||||
|
||||
const saved = localStorage.getItem(STORAGE_KEY);
|
||||
|
|
@ -12,9 +10,9 @@ function init() {
|
|||
details.open = !isCollapsed;
|
||||
}
|
||||
|
||||
function toggleHandler() {
|
||||
const toggleHandler = () => {
|
||||
localStorage.setItem(STORAGE_KEY, String(!details.open));
|
||||
}
|
||||
};
|
||||
|
||||
details.addEventListener("toggle", toggleHandler);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import matter from "gray-matter";
|
|||
import remarkFrontmatter from "remark-frontmatter";
|
||||
import yaml from "js-yaml";
|
||||
import toml from "toml";
|
||||
import type { PluggableList } from "unified";
|
||||
import type {
|
||||
QuartzTransformerPlugin,
|
||||
BuildCtx,
|
||||
|
|
@ -162,8 +161,8 @@ export const NoteProperties: QuartzTransformerPlugin<Partial<NotePropertiesOptio
|
|||
const opts = { ...defaultOptions, ...userOpts };
|
||||
return {
|
||||
name: "NoteProperties",
|
||||
markdownPlugins(ctx: BuildCtx) {
|
||||
const { cfg, allSlugs } = ctx;
|
||||
markdownPlugins(_ctx: BuildCtx) {
|
||||
const { allSlugs } = _ctx;
|
||||
return [
|
||||
[remarkFrontmatter, ["yaml", "toml"]],
|
||||
() => {
|
||||
|
|
|
|||
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