Skip to content

Commit 7295526

Browse files
committed
Fix tslint issue when invoking plugin with the Native Only option in TS apps.
1 parent 318034d commit 7295526

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

generator/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,10 @@ module.exports = async (api, options, rootOptions) => {
262262

263263
if (api.hasPlugin('typescript')) {
264264
if (fs.existsSync(api.resolve('tslint.json'))) {
265-
require('../lib/tslint')({}, api, true);
265+
const baseDir = genConfig.nativeAppPathModifier;
266+
require('../lib/tslint')({
267+
'_': [`${baseDir}/**/*.ts`, `${baseDir}/**/*.vue`, `${baseDir}/**/*.tsx`, 'tests/**/*.ts', 'tests/**/*.tsx']
268+
}, api, true);
266269
tslintSetup(genConfig.dirPathPrefix, api.resolve('tslint.json'), genConfig.tsExclusionArray);
267270
}
268271

0 commit comments

Comments
 (0)