Revert "chore: (eslint) restrict imports of @material-ui Link"
This reverts commit 7539b36748.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': minor
|
||||
---
|
||||
|
||||
Added a new ESLint rule that restricts imports of Link from @material-ui
|
||||
|
||||
The rule can be can be overridden in the following way:
|
||||
|
||||
```diff
|
||||
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, {
|
||||
+ restrictedImports: [
|
||||
+ { name: '@material-ui/core', importNames: [] },
|
||||
+ { name: '@material-ui/core/Link', importNames: [] },
|
||||
+ ],
|
||||
});
|
||||
```
|
||||
@@ -239,17 +239,6 @@ function createConfigForRole(dir, role, extraConfig = {}) {
|
||||
name: '@material-ui/icons/', // because this is possible too ._.
|
||||
message: "Please import '@material-ui/icons/<Icon>' instead.",
|
||||
},
|
||||
{
|
||||
name: '@material-ui/core',
|
||||
importNames: ['Link'],
|
||||
message:
|
||||
'Prefer using `Link` from `@backstage/core-components` rather than material-UI',
|
||||
},
|
||||
{
|
||||
name: '@material-ui/core/Link',
|
||||
message:
|
||||
'Prefer using `Link` from `@backstage/core-components` rather than material-UI',
|
||||
},
|
||||
...require('module').builtinModules,
|
||||
...(extraConfig.restrictedImports ?? []),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user