Skip to content

Commit a0904f0

Browse files
fix tsconfig for react lint checking
1 parent d9a225c commit a0904f0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/devextreme-cli/src/applications/application.react.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ const create = async(appName, options) => {
6969

7070
const appPath = path.join(process.cwd(), appName);
7171

72+
patchTsConfig(appPath);
73+
7274
modifyIndexHtml(appPath, templateOptions.project);
7375

7476
addTemplate(appPath, appName, templateOptions);
@@ -117,6 +119,15 @@ const addTemplate = (appPath, appName, templateOptions) => {
117119
install({}, appPath, styles);
118120
};
119121

122+
function patchTsConfig(appPath) {
123+
const tsConfigPath = path.join(appPath, 'tsconfig.json');
124+
const tsConfig = JSON.parse(fs.readFileSync(tsConfigPath, 'utf8'));
125+
126+
tsConfig.include = ['src'];
127+
128+
fs.writeFileSync(tsConfigPath, JSON.stringify(tsConfig, null, 2), 'utf8');
129+
}
130+
120131
const install = (options, appPath, styles) => {
121132
appPath = appPath ? appPath : process.cwd();
122133

0 commit comments

Comments
 (0)