Skip to content

Commit e78111b

Browse files
committed
Disable typescript linting outside main project
1 parent a754bcf commit e78111b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/react-scripts/config/webpack.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,12 @@ module.exports = function(webpackEnv) {
355355
},
356356
],
357357
include: includePaths,
358+
// Don't lint typescript files outside the main package because it has problems with some syntax rules, e.g. abstract
359+
exclude: useTypeScript
360+
? file =>
361+
/\.tsx?/.test(path.extname(file)) &&
362+
!file.startsWith(paths.appSrc)
363+
: undefined,
358364
},
359365
{
360366
// "oneOf" will traverse all following loaders until one will

0 commit comments

Comments
 (0)