File tree Expand file tree Collapse file tree 8 files changed +16
-5
lines changed
examples/routing-with-resources
resource-store/utils/get-resources-for-next-location Expand file tree Collapse file tree 8 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " react-resource-router " : patch
3+ ---
4+
5+ Remove cyclic imports and add eslint rule to stop future issues
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ module.exports = {
4545 'react-hooks/exhaustive-deps' : 'warn' ,
4646 'react-hooks/rules-of-hooks' : 'error' ,
4747 semi : 'off' ,
48+ 'import/no-cycle' : 'error' ,
4849 } ,
4950 overrides : [
5051 {
Original file line number Diff line number Diff line change 11import React from 'react' ;
22
3+ // eslint-disable-next-line import/no-cycle
34import { homeRoute } from './routes' ;
45
56import { Link , useQueryParam } from 'react-resource-router' ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
22
3+ // eslint-disable-next-line import/no-cycle
34import { aboutRoute } from './routes' ;
45
56import { Link } from 'react-resource-router' ;
Original file line number Diff line number Diff line change 1+ /* eslint-disable import/no-cycle */
12import { About , aboutResource } from './about' ;
23import { Home , homeResource } from './home' ;
34
Original file line number Diff line number Diff line change 1- import { RouterContext } from '../../../../../index' ;
1+ import { type RouterContext } from '../../../../../index' ;
22import {
33 ResourceStoreContext ,
44 RouteResource ,
Original file line number Diff line number Diff line change 11import { useCallback , useMemo } from 'react' ;
22import { createHook } from 'react-sweet-state' ;
33
4+ import { type RouterContext } from '../../../common/types' ;
45import {
5- RouterContext ,
66 RouterStore ,
77 useRouterStoreActions ,
8+ } from '../../../controllers/router-store' ;
9+ import {
810 type EntireRouterState ,
911 type AllRouterActions ,
10- } from '../../../index ' ;
12+ } from '../../../controllers/router-store/types ' ;
1113import {
1214 RouteResource ,
1315 RouteResourceResponse ,
1416 RouteResourceUpdater ,
1517 UseResourceHookResponse ,
16- } from '../../index ' ;
18+ } from '../../common/types ' ;
1719import { useResourceStore , useResourceStoreActions } from '../resource-store' ;
1820
1921type UseResourceOptions = {
Original file line number Diff line number Diff line change 1- import { Plugin , RouterContext } from '../../index' ;
1+ import type { Plugin , RouterContext } from '../../index' ;
22import type {
33 ResourceStoreContext ,
44 RouteResourceResponse ,
You can’t perform that action at this time.
0 commit comments