Fix some lint errors

This commit is contained in:
Przemek Więch
2026-04-28 23:28:52 +02:00
parent 0443741537
commit 36852348a8
4 changed files with 7 additions and 9 deletions

View File

@@ -25,8 +25,6 @@ module.exports = {
'plugin:react/recommended', 'plugin:react/recommended',
], ],
rules: { rules: {
'no-var': 'off',
'prefer-const': 'off',
'no-case-declarations': 'off', 'no-case-declarations': 'off',
'prefer-spread': 'off', 'prefer-spread': 'off',
'no-extra-boolean-cast': 'off', 'no-extra-boolean-cast': 'off',

View File

@@ -150,7 +150,7 @@ function getArguments(location: H.Location<any>): Arguments {
const hash = getParam('file'); const hash = getParam('file');
const url = getParam('url'); const url = getParam('url');
const embedded = getParam('embedded') === 'true'; // False by default. const embedded = getParam('embedded') === 'true'; // False by default.
var sourceSpec: DataSourceSpec | undefined = undefined; let sourceSpec: DataSourceSpec | undefined = undefined;
if (staticUrl) { if (staticUrl) {
sourceSpec = { sourceSpec = {
source: DataSourceEnum.GEDCOM_URL, source: DataSourceEnum.GEDCOM_URL,
@@ -267,9 +267,9 @@ export function App() {
if (data === undefined) { if (data === undefined) {
return; return;
} }
let shouldHideIds = config.id === Ids.HIDE; const shouldHideIds = config.id === Ids.HIDE;
let shouldHideSex = config.sex === Sex.HIDE; const shouldHideSex = config.sex === Sex.HIDE;
let indiMap = idToIndiMap(data.chartData); const indiMap = idToIndiMap(data.chartData);
indiMap.forEach((indi) => { indiMap.forEach((indi) => {
indi.hideId = shouldHideIds; indi.hideId = shouldHideIds;
indi.hideSex = shouldHideSex; indi.hideSex = shouldHideSex;

View File

@@ -54,7 +54,7 @@ async function loadGedzip(
let gedcom = undefined; let gedcom = undefined;
const images = new Map<string, string>(); const images = new Map<string, string>();
for (let fileName of Object.keys(unzipped)) { for (const fileName of Object.keys(unzipped)) {
if (fileName.endsWith('.ged')) { if (fileName.endsWith('.ged')) {
if (gedcom) { if (gedcom) {
console.warn('Multiple GEDCOM files found in zip archive.'); console.warn('Multiple GEDCOM files found in zip archive.');

View File

@@ -60,13 +60,13 @@ function attributeDetails(entry: GedcomEntry) {
return null; return null;
} }
let attributeName = entry.tree const attributeName = entry.tree
.filter((subentry) => subentry.tag === 'TYPE') .filter((subentry) => subentry.tag === 'TYPE')
.flatMap((type) => getData(type)) .flatMap((type) => getData(type))
.join() .join()
.trim(); .trim();
let attributeValue = getData(entry).join(' ').trim(); const attributeValue = getData(entry).join(' ').trim();
if(attributeName) { if(attributeName) {
return ( return (
<> <>