modify eslint and tsconfig files to be nonbreaking
Signed-off-by: Paul Schultz <pschultz@pobox.com>
This commit is contained in:
@@ -246,15 +246,16 @@ function createConfigForRole(dir, role, extraConfig = {}) {
|
||||
rules: {
|
||||
'react/react-in-jsx-scope': 'off',
|
||||
'no-restricted-syntax': [
|
||||
'error',
|
||||
'warn',
|
||||
{
|
||||
message: 'Default React import not allowed.',
|
||||
message:
|
||||
'React default imports are deprecated. Follow the x migration guide for details.',
|
||||
selector:
|
||||
"ImportDeclaration[source.value='react'][specifiers.0.type='ImportDefaultSpecifier']",
|
||||
},
|
||||
{
|
||||
message:
|
||||
'Default React import not allowed. 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 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`.',
|
||||
selector:
|
||||
"ImportDeclaration[source.value='react'] :matches(ImportDefaultSpecifier, ImportNamespaceSpecifier)",
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"importHelpers": false,
|
||||
"incremental": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "react-jsx",
|
||||
"jsx": "react",
|
||||
"lib": ["DOM", "DOM.Iterable", "ScriptHost", "ES2022"],
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
|
||||
Reference in New Issue
Block a user