Restrict imports on the form ../../plugins/x/src
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Restrict imports on the form `../../plugins/x/src`
|
||||
@@ -62,7 +62,10 @@ module.exports = {
|
||||
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true },
|
||||
],
|
||||
// Avoid cross-package imports
|
||||
'no-restricted-imports': [2, { patterns: ['**/../../**/*/src/**'] }],
|
||||
'no-restricted-imports': [
|
||||
2,
|
||||
{ patterns: ['**/../../**/*/src/**', '**/../../**/*/src'] },
|
||||
],
|
||||
// Avoid default import from winston as it breaks at runtime
|
||||
'no-restricted-syntax': [
|
||||
'error',
|
||||
|
||||
@@ -83,7 +83,7 @@ module.exports = {
|
||||
...require('module').builtinModules,
|
||||
],
|
||||
// Avoid cross-package imports
|
||||
patterns: ['**/../../**/*/src/**'],
|
||||
patterns: ['**/../../**/*/src/**', '**/../../**/*/src'],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
"lodash": "^4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils-core": "^0.1.2",
|
||||
"@types/jest": "^26.0.7",
|
||||
"@types/node": "^14.14.32"
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { withLogCollector } from '../../test-utils-core/src';
|
||||
import { withLogCollector } from '@backstage/test-utils-core';
|
||||
import { ConfigReader } from './reader';
|
||||
|
||||
const DATA = {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
import { ApiRef } from '@backstage/core-plugin-api';
|
||||
import { BackstageIdentityApi } from '@backstage/core-plugin-api';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import { Breadcrumbs as Breadcrumbs_2 } from '@material-ui/core';
|
||||
import { ButtonProps } from '@material-ui/core';
|
||||
import { CardHeaderProps } from '@material-ui/core';
|
||||
@@ -25,7 +26,6 @@ import { LinkProps as LinkProps_2 } from '@material-ui/core';
|
||||
import { LinkProps as LinkProps_3 } from 'react-router-dom';
|
||||
import { MaterialTableProps } from '@material-table/core';
|
||||
import { NavLinkProps } from 'react-router-dom';
|
||||
import { Palette } from '@material-ui/core/styles/createPalette';
|
||||
import { ProfileInfoApi } from '@backstage/core-plugin-api';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
WithStyles,
|
||||
} from '@material-ui/core';
|
||||
import React from 'react';
|
||||
import { BackstageTheme } from '../../../../theme/src';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
|
||||
const styles = (theme: BackstageTheme) =>
|
||||
createStyles({
|
||||
|
||||
Reference in New Issue
Block a user