mirror of
https://github.com/panatgithub/AnkiHeadingSync.git
synced 2026-07-22 06:51:43 +00:00
fix(review): satisfy Obsidian review bot lint
中文: 修复 Obsidian Review Bot 指出的英文文案 sentence case 问题,并调整设置页测试中的计时器类型,避免禁用 prefer-active-window-timers 规则。 English: Fix the remaining Obsidian Review Bot sentence-case findings and update the settings tab test timer shim so no prefer-active-window-timers disable comment is needed.
This commit is contained in:
parent
387f977dca
commit
13b5685fe5
3 changed files with 10 additions and 10 deletions
2
main.js
2
main.js
File diff suppressed because one or more lines are too long
|
|
@ -18,11 +18,11 @@ export const en = {
|
|||
},
|
||||
qaHeadingLevel: {
|
||||
name: "Heading level for question-and-answer cards",
|
||||
desc: "Use heading level 4 by default.",
|
||||
desc: "Default question-and-answer heading level is 4.",
|
||||
},
|
||||
clozeHeadingLevel: {
|
||||
name: "Cloze heading level",
|
||||
desc: "Use heading level 5 by default.",
|
||||
desc: "Default cloze heading level is 5.",
|
||||
},
|
||||
cardAnswerCutoffMode: {
|
||||
name: "Card answer cutoff mode",
|
||||
|
|
@ -413,7 +413,7 @@ export const en = {
|
|||
noteFieldMappingsQaGroupAcceptedWarningsArray: "Question-and-answer group field mapping acceptedWarnings must be an array.",
|
||||
noteFieldMappingsQaGroupAcceptedWarningsStrings: "Question-and-answer group field mapping acceptedWarnings can only contain strings.",
|
||||
noteFieldMappingsQaGroupDerivationObject: "Question-and-answer group field mapping derivation must be an object.",
|
||||
noteFieldMappingsQaGroupDerivationMode: "Question-and-answer group field mapping derivation.mode must be first-pair.",
|
||||
noteFieldMappingsQaGroupDerivationMode: "Question-and-answer group field mapping derivation mode must be first-pair.",
|
||||
noteFieldMappingsQaGroupDerivationFirstQuestionField: "Question-and-answer group field mapping derivation.firstQuestionField must be a string.",
|
||||
noteFieldMappingsQaGroupDerivationFirstAnswerField: "Question-and-answer group field mapping derivation.firstAnswerField must be a string.",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -700,15 +700,15 @@ function isCardExpanded(tab: AnkiHeadingSyncSettingTab, cardId: string): boolean
|
|||
}
|
||||
|
||||
type TestActiveWindow = {
|
||||
setTimeout: (callback: () => void, delay?: number) => ReturnType<typeof setTimeout>;
|
||||
clearTimeout: (timer: ReturnType<typeof setTimeout>) => void;
|
||||
setTimeout: Window["setTimeout"];
|
||||
clearTimeout: Window["clearTimeout"];
|
||||
};
|
||||
|
||||
type TestWindow = {
|
||||
activeWindow: TestActiveWindow;
|
||||
ResizeObserver: typeof ResizeObserver;
|
||||
readonly setTimeout: typeof setTimeout;
|
||||
readonly clearTimeout: typeof clearTimeout;
|
||||
readonly setTimeout: Window["setTimeout"];
|
||||
readonly clearTimeout: Window["clearTimeout"];
|
||||
};
|
||||
|
||||
function createTestWindow(): TestWindow {
|
||||
|
|
@ -720,10 +720,10 @@ function createTestWindow(): TestWindow {
|
|||
};
|
||||
|
||||
testWindow = {
|
||||
get setTimeout(): typeof setTimeout {
|
||||
get setTimeout(): Window["setTimeout"] {
|
||||
return setTimeout;
|
||||
},
|
||||
get clearTimeout(): typeof clearTimeout {
|
||||
get clearTimeout(): Window["clearTimeout"] {
|
||||
return clearTimeout;
|
||||
},
|
||||
activeWindow,
|
||||
|
|
|
|||
Loading…
Reference in a new issue