diff --git a/app/eslint.config.js b/app/eslint.config.js index 2ced3c8e..42d7beb0 100644 --- a/app/eslint.config.js +++ b/app/eslint.config.js @@ -75,6 +75,9 @@ export default tseslint.config( }, }, rules: { + // ESLint comments rules - allow whole-file disables without eslint-enable + '@eslint-community/eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }], + // Basic rules 'no-console': 'error', 'no-debugger': 'error', diff --git a/app/src/api/inviteApi.ts b/app/src/api/inviteApi.ts index d583a71b..8dcd8d8a 100644 --- a/app/src/api/inviteApi.ts +++ b/app/src/api/inviteApi.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import-x/no-relative-parent-imports import { config } from '@/config' import type { UserApi } from 'utopia-ui' diff --git a/app/src/main.tsx b/app/src/main.tsx index b6424151..ccb66470 100644 --- a/app/src/main.tsx +++ b/app/src/main.tsx @@ -1,5 +1,4 @@ /* eslint-disable import-x/extensions */ -/* eslint-disable import-x/no-named-as-default-member */ /* eslint-disable @typescript-eslint/no-non-null-assertion */ import React from 'react' import ReactDOM from 'react-dom/client' diff --git a/lib/eslint.config.js b/lib/eslint.config.js index 3cae154e..f6224e1c 100644 --- a/lib/eslint.config.js +++ b/lib/eslint.config.js @@ -75,6 +75,9 @@ export default tseslint.config( }, }, rules: { + // ESLint comments rules - allow whole-file disables without eslint-enable + '@eslint-community/eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }], + // Basic rules 'no-console': 'error', 'no-debugger': 'error', diff --git a/lib/src/Components/AppShell/hooks/useAppState.tsx b/lib/src/Components/AppShell/hooks/useAppState.tsx index 2db08b38..c31086ed 100644 --- a/lib/src/Components/AppShell/hooks/useAppState.tsx +++ b/lib/src/Components/AppShell/hooks/useAppState.tsx @@ -1,5 +1,4 @@ /* eslint-disable react/prop-types */ -/* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useState, createContext, useContext } from 'react' import type { AssetsApi } from '#types/AssetsApi' diff --git a/lib/src/Components/Gaming/hooks/useQuests.tsx b/lib/src/Components/Gaming/hooks/useQuests.tsx index 1b3cc1d4..6539a008 100644 --- a/lib/src/Components/Gaming/hooks/useQuests.tsx +++ b/lib/src/Components/Gaming/hooks/useQuests.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useState, createContext, useContext } from 'react' type UseQuestManagerResult = ReturnType diff --git a/lib/src/Components/Map/UtopiaMapInner.tsx b/lib/src/Components/Map/UtopiaMapInner.tsx index edde0979..62557f77 100644 --- a/lib/src/Components/Map/UtopiaMapInner.tsx +++ b/lib/src/Components/Map/UtopiaMapInner.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable @typescript-eslint/restrict-plus-operands */ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ diff --git a/lib/src/Components/Map/hooks/useClusterRef.tsx b/lib/src/Components/Map/hooks/useClusterRef.tsx index a445dd90..191bd629 100644 --- a/lib/src/Components/Map/hooks/useClusterRef.tsx +++ b/lib/src/Components/Map/hooks/useClusterRef.tsx @@ -1,5 +1,4 @@ /* eslint-disable react/prop-types */ -/* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-explicit-any */ import { createContext, useContext, useState } from 'react' diff --git a/lib/src/Components/Map/hooks/useFilter.tsx b/lib/src/Components/Map/hooks/useFilter.tsx index d7733f04..04928669 100644 --- a/lib/src/Components/Map/hooks/useFilter.tsx +++ b/lib/src/Components/Map/hooks/useFilter.tsx @@ -1,8 +1,6 @@ /* eslint-disable react/prop-types */ /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ -/* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable @typescript-eslint/no-unnecessary-condition */ -/* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable no-case-declarations */ import { useCallback, useReducer, createContext, useContext, useState, useEffect } from 'react' import { useNavigate } from 'react-router-dom' diff --git a/lib/src/Components/Map/hooks/useItems.tsx b/lib/src/Components/Map/hooks/useItems.tsx index b15fdceb..f0f8be98 100644 --- a/lib/src/Components/Map/hooks/useItems.tsx +++ b/lib/src/Components/Map/hooks/useItems.tsx @@ -1,6 +1,5 @@ /* eslint-disable react/prop-types */ /* eslint-disable @typescript-eslint/require-await */ -/* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/restrict-template-expressions */ diff --git a/lib/src/Components/Map/hooks/useLayers.tsx b/lib/src/Components/Map/hooks/useLayers.tsx index 963063b0..7160db26 100644 --- a/lib/src/Components/Map/hooks/useLayers.tsx +++ b/lib/src/Components/Map/hooks/useLayers.tsx @@ -11,7 +11,6 @@ type UseItemManagerResult = ReturnType const LayerContext = createContext({ layers: [], - // eslint-disable-next-line @typescript-eslint/no-empty-function addLayer: () => {}, }) diff --git a/lib/src/Components/Map/hooks/useLeafletRefs.tsx b/lib/src/Components/Map/hooks/useLeafletRefs.tsx index a092d98e..456456ea 100644 --- a/lib/src/Components/Map/hooks/useLeafletRefs.tsx +++ b/lib/src/Components/Map/hooks/useLeafletRefs.tsx @@ -1,6 +1,5 @@ /* eslint-disable react/prop-types */ /* eslint-disable @typescript-eslint/ban-types */ -/* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useReducer, createContext, useContext } from 'react' import type { Item } from '#types/Item' diff --git a/lib/src/Components/Map/hooks/usePermissions.tsx b/lib/src/Components/Map/hooks/usePermissions.tsx index 933ccc07..f0085459 100644 --- a/lib/src/Components/Map/hooks/usePermissions.tsx +++ b/lib/src/Components/Map/hooks/usePermissions.tsx @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/no-misused-promises */ -/* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ diff --git a/lib/src/Components/Map/hooks/useSelectPosition.tsx b/lib/src/Components/Map/hooks/useSelectPosition.tsx index 49edc8ea..c6aec921 100644 --- a/lib/src/Components/Map/hooks/useSelectPosition.tsx +++ b/lib/src/Components/Map/hooks/useSelectPosition.tsx @@ -1,7 +1,6 @@ /* eslint-disable react/prop-types */ /* eslint-disable @typescript-eslint/prefer-optional-chain */ /* eslint-disable @typescript-eslint/no-floating-promises */ -/* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ /* eslint-disable @typescript-eslint/restrict-plus-operands */ /* eslint-disable @typescript-eslint/no-non-null-assertion */ diff --git a/lib/src/Components/Map/hooks/useTags.tsx b/lib/src/Components/Map/hooks/useTags.tsx index 4649b627..afe74d11 100644 --- a/lib/src/Components/Map/hooks/useTags.tsx +++ b/lib/src/Components/Map/hooks/useTags.tsx @@ -1,6 +1,5 @@ /* eslint-disable react/prop-types */ /* eslint-disable @typescript-eslint/no-misused-promises */ -/* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable @typescript-eslint/no-floating-promises */ /* eslint-disable @typescript-eslint/prefer-optional-chain */ /* eslint-disable @typescript-eslint/no-non-null-assertion */ diff --git a/lib/src/Components/Profile/Subcomponents/ColorPicker.tsx b/lib/src/Components/Profile/Subcomponents/ColorPicker.tsx index 7e3c2501..65202522 100644 --- a/lib/src/Components/Profile/Subcomponents/ColorPicker.tsx +++ b/lib/src/Components/Profile/Subcomponents/ColorPicker.tsx @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ -/* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ import { useCallback, useEffect, useRef, useState } from 'react' import { HexColorPicker } from 'react-colorful' diff --git a/lib/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx b/lib/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx index e30f9d3f..355b2ba1 100644 --- a/lib/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx +++ b/lib/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unnecessary-condition */