Skip to content

Commit 36ef757

Browse files
committed
WIP
1 parent c7df1bb commit 36ef757

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

packages/react-scripts/config/paths.js

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,33 +126,30 @@ const reactScriptsLinked =
126126
fs.lstatSync(reactScriptsPath).isSymbolicLink();
127127

128128
// config before publish: we're in ./packages/react-scripts/config/
129-
130129
if (
131130
!reactScriptsLinked &&
132131
__dirname.indexOf(path.join('packages', 'react-scripts', 'config')) !== -1
133132
) {
134-
const template = 'template';
135-
136133
module.exports = {
137-
dotenv: resolveOwn(`${template}/.env`),
134+
dotenv: resolveOwn('template/.env'),
138135
appPath: resolveApp('.'),
139136
appBuild: resolveOwn('../../build'),
140-
appPublic: resolveOwn(`${template}/public`),
141-
appHtml: resolveOwn(`${template}/public/index.html`),
142-
appIndexJs: resolveModule(resolveOwn, `${template}/src/index`),
137+
appPublic: resolveOwn('template/public'),
138+
appHtml: resolveOwn('template/public/index.html'),
139+
appIndexJs: resolveModule(resolveOwn, 'template/src/index'),
143140
appPackageJson: resolveOwn('package.json'),
144-
appSrc: resolveOwn(`${template}/src`),
145-
appTsConfig: resolveOwn(`${template}/tsconfig.json`),
146-
yarnLockFile: resolveOwn(`${template}/yarn.lock`),
147-
testsSetup: resolveModule(resolveOwn, `${template}/src/setupTests`),
148-
proxySetup: resolveOwn(`${template}/src/setupProxy.js`),
141+
appSrc: resolveOwn('template/src'),
142+
appTsConfig: resolveOwn('template/tsconfig.json'),
143+
yarnLockFile: resolveOwn('template/yarn.lock'),
144+
testsSetup: resolveModule(resolveOwn, 'template/src/setupTests'),
145+
proxySetup: resolveOwn('template/src/setupProxy.js'),
149146
appNodeModules: resolveOwn('node_modules'),
150147
publicUrl: getPublicUrl(resolveOwn('package.json')),
151148
servedPath: getServedPath(resolveOwn('package.json')),
152149
// These properties only exist before ejecting:
153150
ownPath: resolveOwn('.'),
154151
ownNodeModules: resolveOwn('node_modules'),
155-
appTypeDeclarations: resolveOwn(`${template}/src/react-app-env.d.ts`),
152+
appTypeDeclarations: resolveOwn('template/src/react-app-env.d.ts'),
156153
ownTypeDeclarations: resolveOwn('lib/react-app.d.ts'),
157154
};
158155
}

packages/react-scripts/config/tslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"no-eval": true,
1515
"no-floating-promises": true,
1616
"no-for-in-array": true,
17-
"no-implicit-dependencies": true,
17+
"no-implicit-dependencies": [true, "dev"],
1818
"no-invalid-template-strings": true,
1919
"no-invalid-this": true,
2020
"no-namespace": true,

0 commit comments

Comments
 (0)