My gulp-tslint had no output compared to tslint alone :-(
I've realized this happens because I'm using tsProject.src() rather than gulp.src("FlexibleForm/**/*.ts")
with const tsProject = ts.createProject('FlexibleForm/tsconfig.json');
Thus I found a workaround.
But I'd like to share this issue and I have some questions:
H:\FlexibleFormTypeScript>gulp tslint
[16:05:37] Using gulpfile H:\FlexibleFormTypeScript\gulpfile.js
[16:05:37] Starting 'tslint'...
[16:05:37] Finished 'tslint' after 187 ms
H:\FlexibleFormTypeScript>
However, calling tslint manually, I do have some errors...
H:\FlexibleFormTypeScript>node node_modules\tslint\bin\tslint -p FlexibleForm/tsconfig.json --format stylish
ERROR...
So I have a tslint.json at top and a FlexibleForm/tsconfig.json under.
The idea is that I have other typescript project next to FlexibleForm/, but I want them to reference the same tslint.json.
Is this hierarchy the cause of my issue?
H:\FlexibleFormTypeScript>gulp tslint
[16:25:44] Using gulpfile H:\FlexibleFormTypeScript\gulpfile.js
[16:25:44] Starting 'tslint'...
H:/FlexibleFormTypeScript/FlexibleForm/Layout/Footer.ts
ERROR: 21:52 quotemark ' should be "
H:/FlexibleFormTypeScript/FlexibleForm/Layout/Header.ts
ERROR: 22:5 comment-format comment must start with a space
ERROR: 44:1 max-line-length Exceeds maximum line length of 140
ERROR: 51:1 no-trailing-whitespace trailing whitespace
ERROR: 57:1 no-trailing-whitespace trailing whitespace
H:/FlexibleFormTypeScript/FlexibleForm/Layout/_Containers.ts
ERROR: 11:2 object-literal-sort-keys The key 'Footer' is not sorted alphabetically
ERROR: 3:1 ordered-imports Import sources within a group must be alphabetized.
[16:25:44] 'tslint' errored after 484 ms
[16:25:44] Error in plugin 'gulp-tslint'
Message:.....
Thus, I found an acceptable workaround.
But:
Why is it not working despite working fine for gulp-typescript ?
(I understand gulp-typescript might be responsible rather than gulp-tslint but this is linked for me)
Is this a known issue? Is it possible to use tsProject.src()? If not I'd recommend to add a message in the README.md!
Hi,
My gulp-tslint had no output compared to tslint alone :-( I've realized this happens because I'm using
tsProject.src()
rather thangulp.src("FlexibleForm/**/*.ts")
withconst tsProject = ts.createProject('FlexibleForm/tsconfig.json');
Thus I found a workaround. But I'd like to share this issue and I have some questions:The gulp-typescript documentation tells us:
And it works fine in my task 'transpile-ts'. This is why I found it handy for my gulp-tslint task...
gulp-tslint version: 8.1.2 tslint version: 5.6.0 Operating system: Windows 10
Failing gulp configuration:
Console output, no linter warnings/error :
However, calling tslint manually, I do have some errors...
H:\FlexibleFormTypeScript>node node_modules\tslint\bin\tslint -p FlexibleForm/tsconfig.json --format stylish
ERROR...Tree:
So I have a tslint.json at top and a FlexibleForm/tsconfig.json under. The idea is that I have other typescript project next to FlexibleForm/, but I want them to reference the same tslint.json. Is this hierarchy the cause of my issue?
FlexibleForm/tsconfig.json:
Working version:
I get:
Thus, I found an acceptable workaround. But:
tsProject.src()
? If not I'd recommend to add a message in the README.md!