From bdd13e88ce7ef9c0ee1c164649ba2cb20e83a604 Mon Sep 17 00:00:00 2001 From: yugal07 Date: Thu, 16 Jan 2025 22:52:31 +0530 Subject: [PATCH] Removed eslint-ignore comments and added override rule specifically for the target file --- .eslintrc.json | 9 +++++++++ scripts/githooks/check-localstorage-usage.js | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index de93fb465f..3550fef94f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -153,5 +153,14 @@ "docs/sidebars.ts", "docs/src/**", "docs/blog/**" + ], + "overrides": [ + { + "files": ["scripts/githooks/check-localstorage-usage.js"], + "rules": { + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/explicit-function-return-type": "off" + } + } ] } diff --git a/scripts/githooks/check-localstorage-usage.js b/scripts/githooks/check-localstorage-usage.js index dfee24c139..0a7e2adbfc 100755 --- a/scripts/githooks/check-localstorage-usage.js +++ b/scripts/githooks/check-localstorage-usage.js @@ -7,7 +7,6 @@ import { execSync } from 'child_process'; const args = process.argv.slice(2); const scanEntireRepo = args.includes('--scan-entire-repo'); -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type const containsSkipComment = (file) => { try { const content = readFileSync(file, 'utf-8'); @@ -18,7 +17,6 @@ const containsSkipComment = (file) => { } }; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type const getModifiedFiles = () => { try { if (scanEntireRepo) { @@ -42,7 +40,6 @@ const files = getModifiedFiles(); const filesWithLocalStorage = []; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type const checkLocalStorageUsage = (file) => { if (!file) { return;