Closed Chowarmaan closed 8 years ago
Can you post the version of tslint at ~\Development\node_modules\tslint\ and the version of TypeScript used (perhaps located in ~\Development\node_modules\typescript)? Usually this kind of error happens due to a tslint and TypeScript version mismatch. Try to update them to the latest versions.
├─┬ tslint@3.2.1 │ ├── glob@6.0.4 │ ├─┬ optimist@0.6.1 │ │ ├── minimist@0.0.10 │ │ └── wordwrap@0.0.2 │ └── underscore.string@3.1.1 └── typescript@1.7.5
These are local to the project.
Can you post the output of tslint -v
? Note that running tslint from the command line may use a different version than what is under node_modules of the current directory.
For example:
nawi ~/dev/gulp-tslint cat node_modules/tslint/package.json | grep version
"version": "3.2.1"
nawi ~/dev/gulp-tslint tslint -v
3.1.1
nawi ~/dev/gulp-tslint which tslint
/usr/local/bin/tslint
~\Development>cat node_modules/tslint/package.json | grep version "version": "3.2.1"
node_modules.bin\tslint -v 3.2.1
Hi, sorry to both again, but I meant the output of tslint -v
, not node_modules.bin\tslint -v
(I'm not quite sure if they're the same thing for you).
Sorry, running just tslint gives an error as I did not install it globally, it is only in the project directory which is why I added the second line with the node_modules.bin\tslint -v.
I added typescript and tslint to the global install, and the same error occurs. The tslint -v when installed globally still returns 3.2.1
Can you try again with the latest versions of gulp-tslint and tslint?
Using the latest version, 3.7.4 has this problem solved. It is working properly.
In trying to get this setup, I am getting an error in gulp-tslint, that I do not get using tslint on the command line.
This is the sub job that runs the Typescript compile and TSLint
My Test file that should have errors
gulp-tslint error generated when running gulp:
However, running the tslint from the command line (in the same directory as gulp), the coding issues are returned.