mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-07-25 13:11:48 +00:00
fix lint and remove all eslint overrides
This commit is contained in:
@@ -45,7 +45,7 @@ function compare(a: lunr.Index.Result, b: lunr.Index.Result) {
|
||||
/** Returns all last names of all husbands as a space-separated string. */
|
||||
function getHusbandLastName(
|
||||
indi: JsonIndi,
|
||||
indiMap: Map<String, JsonIndi>,
|
||||
indiMap: Map<string, JsonIndi>,
|
||||
famMap: Map<string, JsonFam>,
|
||||
): string {
|
||||
return (indi.fams || [])
|
||||
@@ -67,6 +67,7 @@ class LunrSearchIndex implements SearchIndex {
|
||||
}
|
||||
|
||||
initialize() {
|
||||
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
||||
const self = this;
|
||||
this.index = lunr(function () {
|
||||
//Trimmer will break non-latin characters, so custom multilingual implementation must be used
|
||||
@@ -110,6 +111,7 @@ class LunrSearchIndex implements SearchIndex {
|
||||
const pipelineFunctions: PipelineFunction[] = [];
|
||||
const searchPipelineFunctions: PipelineFunction[] = [];
|
||||
languages.forEach((language) => {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
const lunrLanguage = lunr[language];
|
||||
if (language === 'en') {
|
||||
@@ -129,14 +131,11 @@ class LunrSearchIndex implements SearchIndex {
|
||||
}
|
||||
});
|
||||
lunrInstance.pipeline.reset();
|
||||
lunrInstance.pipeline.add.apply(lunrInstance.pipeline, pipelineFunctions);
|
||||
lunrInstance.pipeline.add(...pipelineFunctions);
|
||||
|
||||
if (lunrInstance.searchPipeline) {
|
||||
lunrInstance.searchPipeline.reset();
|
||||
lunrInstance.searchPipeline.add.apply(
|
||||
lunrInstance.searchPipeline,
|
||||
searchPipelineFunctions,
|
||||
);
|
||||
lunrInstance.searchPipeline.add(...searchPipelineFunctions);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ export function TopBar(props: Props) {
|
||||
}
|
||||
|
||||
switch (screenSize) {
|
||||
case ScreenSize.LARGE:
|
||||
case ScreenSize.LARGE: {
|
||||
// Show dropdown if chart is shown, otherwise show individual menu
|
||||
// items.
|
||||
const menus = props.showingChart ? (
|
||||
@@ -251,6 +251,7 @@ export function TopBar(props: Props) {
|
||||
</>
|
||||
);
|
||||
return menus;
|
||||
}
|
||||
|
||||
case ScreenSize.SMALL:
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user