Skip to content

Commit cb6222b

Browse files
committed
fix: update eslint config and fix some warning
1 parent 54d0170 commit cb6222b

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

eslint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ export default tseslint.config(
2323
'warn',
2424
{ allowConstantExport: true },
2525
],
26+
'react-hooks/refs': 'off',
27+
'react-hooks/purity': 'off',
28+
'react-hooks/set-state-in-effect': 'off',
2629
},
2730
},
2831
)

src/hooks/ChainSyncManger.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ export function ChainSyncManager() {
3333
// init store's chain from location (once at mount time)
3434
useEffect(() => {
3535
setChainId(INITIAL_CHAIN.id);
36-
}, []);
37-
38-
// update store with user account's state
36+
}, [setChainId]); // update store with user account's state
3937
useEffect(() => {
4038
setIsConnected(accountIsConnected);
4139
setAddress(accountAddress);

src/modules/account/ManageIexecAccount.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export function ManageIexecAccount() {
151151
if (!bridge && currentTab === 2) {
152152
setCurrentTab(1);
153153
}
154-
}, [chainId]);
154+
}, [chainId, currentTab, setCurrentTab]);
155155

156156
if (!userAddress) {
157157
return (

src/routes/$chainSlug/_layout/datasets.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function DatasetsRoute() {
142142
if (!isSchemaSearchOpen && filters.length > 0) {
143143
setIsSchemaSearchOpen(true);
144144
}
145-
}, []);
145+
}, [filters.length, isSchemaSearchOpen, setIsSchemaSearchOpen]);
146146

147147
const handleAddFilter = (filter: SchemaFilter) => {
148148
const newFilters = [...filters, filter];

0 commit comments

Comments
 (0)