mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Routing: Enforce imports from the compat package (#95499)
This commit is contained in:
parent
6f888720de
commit
ba2d004161
@ -49,6 +49,14 @@
|
|||||||
"importNames": ["Trans", "t"],
|
"importNames": ["Trans", "t"],
|
||||||
"message": "Please import from app/core/internationalization instead",
|
"message": "Please import from app/core/internationalization instead",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "react-router-dom",
|
||||||
|
"message": "Please import from react-router-dom-v5-compat instead"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "react-router",
|
||||||
|
"message": "Please import from react-router-dom-v5-compat instead"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -4,6 +4,7 @@ import { createMemoryHistory } from 'history';
|
|||||||
import { fromPairs } from 'lodash';
|
import { fromPairs } from 'lodash';
|
||||||
import { stringify } from 'querystring';
|
import { stringify } from 'querystring';
|
||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Route, Router } from 'react-router-dom';
|
import { Route, Router } from 'react-router-dom';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { getGrafanaContextMock } from 'test/mocks/getGrafanaContextMock';
|
import { getGrafanaContextMock } from 'test/mocks/getGrafanaContextMock';
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
import { ComponentType } from 'react';
|
import { ComponentType } from 'react';
|
||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Router } from 'react-router-dom';
|
import { Router } from 'react-router-dom';
|
||||||
import { CompatRouter } from 'react-router-dom-v5-compat';
|
import { CompatRouter } from 'react-router-dom-v5-compat';
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { Store } from '@reduxjs/toolkit';
|
import { Store } from '@reduxjs/toolkit';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Router } from 'react-router-dom';
|
import { Router } from 'react-router-dom';
|
||||||
import { CompatRouter } from 'react-router-dom-v5-compat';
|
import { CompatRouter } from 'react-router-dom-v5-compat';
|
||||||
import { getGrafanaContextMock } from 'test/mocks/getGrafanaContextMock';
|
import { getGrafanaContextMock } from 'test/mocks/getGrafanaContextMock';
|
||||||
|
@ -5,6 +5,7 @@ import { createMemoryHistory, MemoryHistoryBuildOptions } from 'history';
|
|||||||
import { Fragment, PropsWithChildren } from 'react';
|
import { Fragment, PropsWithChildren } from 'react';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Router } from 'react-router-dom';
|
import { Router } from 'react-router-dom';
|
||||||
import { CompatRouter } from 'react-router-dom-v5-compat';
|
import { CompatRouter } from 'react-router-dom-v5-compat';
|
||||||
import { getGrafanaContextMock } from 'test/mocks/getGrafanaContextMock';
|
import { getGrafanaContextMock } from 'test/mocks/getGrafanaContextMock';
|
||||||
|
Loading…
Reference in New Issue
Block a user