Skip to content

Commit 1c76d52

Browse files
committed
aeldar: add synteticImports, imporove excluding in tsconfig
1 parent 2d7bc65 commit 1c76d52

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

packages/react-scripts/template/src/App.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as React from 'react';
2-
import * as ReactDOM from 'react-dom';
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
33
import App from './App';
44

55
it('renders without crashing', () => {

packages/react-scripts/template/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import React from 'react';
22
import logo from './logo.svg';
33
import './App.css';
44

packages/react-scripts/template/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as React from 'react';
2-
import * as ReactDOM from 'react-dom';
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
33
import './index.css';
44
import App from './App';
55
import registerServiceWorker from './registerServiceWorker';

packages/react-scripts/template/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
4242
// "typeRoots": [], /* List of folders to include type definitions from. */
4343
// "types": [], /* Type declaration files to be included in compilation. */
44-
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
44+
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
4545
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
4646
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
4747

@@ -56,6 +56,9 @@
5656
"emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */
5757
},
5858
"exclude": [
59+
"**/*.test.*",
60+
"**/*.spec.*",
61+
"**/__tests__",
5962
"node_modules",
6063
"build",
6164
"tools",

0 commit comments

Comments
 (0)