Need help resolving this eslint issue
Error: Dependency cycle via ../stores/store:30 import/no-cycle
I included the store in my code like this
import { store } from './store';
export default class UserStore {
constructor() {
makeAutoObservable(this);
}
// Code
}
Here is a snippet from the store file
import { createContext, useContext } from 'react';
import { NotistackStore } from './notistackStore';
import UserStore from './userStore';
import AccountStore from './accountStore';
interface Store {
userStore: UserStore;
AccountStore:AccountStore;
notistackStore: NotistackStore;
}
export const store: Store = {
userStore: new UserStore(),
AccountStore: new AccountStore(),
notistackStore: new NotistackStore(),
};
export const StoreContext = createContext(store);
export function useStore() {
return useContext(StoreContext);
}
eslint version [email protected] [email protected]