From dc33f5f0dd41f21f40803cf7501392e1e649b73c Mon Sep 17 00:00:00 2001 From: danielc-n Date: Mon, 21 Oct 2024 09:56:02 +0200 Subject: [PATCH] lint fixes --- .../src/components/EditorPage/Reference/TranslationHelps.js | 1 - .../components/EditorPage/Reference/TranslationHelpsCard.js | 3 ++- .../src/components/Resources/useFetchTranslationResource.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/renderer/src/components/EditorPage/Reference/TranslationHelps.js b/renderer/src/components/EditorPage/Reference/TranslationHelps.js index 5a45f9c5..fa753ab4 100644 --- a/renderer/src/components/EditorPage/Reference/TranslationHelps.js +++ b/renderer/src/components/EditorPage/Reference/TranslationHelps.js @@ -48,7 +48,6 @@ const TranslationHelps = ({ const pathToIngredients = path.resolve(resourceDirPath, offlineResource.data.projectDir, 'ingredients'); if (pathToIngredients) { const pathRelationFile = path.resolve(pathToIngredients, 'relation.txt'); - if (fs.existsSync(pathRelationFile)) { setImagesPath(pathToIngredients); const relationFileContent = fs.readFileSync(pathRelationFile, 'utf8'); diff --git a/renderer/src/components/EditorPage/Reference/TranslationHelpsCard.js b/renderer/src/components/EditorPage/Reference/TranslationHelpsCard.js index 1e456b38..ce3939d8 100644 --- a/renderer/src/components/EditorPage/Reference/TranslationHelpsCard.js +++ b/renderer/src/components/EditorPage/Reference/TranslationHelpsCard.js @@ -116,7 +116,8 @@ export default function TranslationHelpsCard({ // } // return []; // })[0]; - for (let [key, value] of asArray) { + // eslint-disable-next-line + for (const [key, value] of asArray) { if (key.toLocaleLowerCase().indexOf(projectId.toLowerCase()) !== -1) { currentFile = key; break; diff --git a/renderer/src/components/Resources/useFetchTranslationResource.js b/renderer/src/components/Resources/useFetchTranslationResource.js index 701cb0ad..d58081f4 100644 --- a/renderer/src/components/Resources/useFetchTranslationResource.js +++ b/renderer/src/components/Resources/useFetchTranslationResource.js @@ -54,7 +54,7 @@ export const fetchTranslationResource = async (urlpath, setResource, selectResou if (selectResource === 'tn') { filteredRepos = fetchedJson.filter((repo) => repo.topics.includes('burrito' && 'bcvnotes')); } else if (selectResource === 'tir') { - filteredRepos = fetchedJson.filter((repo) => repo.topics.includes('burrito' && 'imagedict') || repo.topics.includes('burrito' && 'videolinks') ); + filteredRepos = fetchedJson.filter((repo) => repo.topics.includes('burrito' && 'imagedict') || repo.topics.includes('burrito' && 'videolinks')); filteredReposResourcelinks = fetchedJson.filter((repo) => repo.topics.includes('burrito' && 'resourcelinks')); }