update default react import eslint warning
Signed-off-by: Paul Schultz <pschultz@pobox.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Included a reference to the JSX transform guide in the warning about using the default React import.
|
||||
@@ -249,13 +249,13 @@ function createConfigForRole(dir, role, extraConfig = {}) {
|
||||
'warn',
|
||||
{
|
||||
message:
|
||||
'React default imports are deprecated. Follow the x migration guide for details.',
|
||||
'React default imports are deprecated. Follow the https://backstage.io/docs/tutorials/jsx-transform-migration migration guide for details.',
|
||||
selector:
|
||||
"ImportDeclaration[source.value='react'][specifiers.0.type='ImportDefaultSpecifier']",
|
||||
},
|
||||
{
|
||||
message:
|
||||
'React default imports are deprecated. Follow the x migration guide for details. If you need a global type that collides with a React named export (such as `MouseEvent`), try using `globalThis.MouseHandler`.',
|
||||
'React default imports are deprecated. Follow the https://backstage.io/docs/tutorials/jsx-transform-migration migration guide for details. If you need a global type that collides with a React named export (such as `MouseEvent`), try using `globalThis.MouseHandler`.',
|
||||
selector:
|
||||
"ImportDeclaration[source.value='react'] :matches(ImportDefaultSpecifier, ImportNamespaceSpecifier)",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user