New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gulp-tslint ignores the no-irregular-whitespace rule #139
Comments
Can you verify that the tslint.json you've created is used by gulp-tslint? I haven't debugged this yet, but it's possible that it's not using the tslint.json file in your project folder for some reason, and maybe falls back to the default lint rules - which might not include the no-irregular-whitespace rule. You could test by e.g. using "tslint.json can be supplied as a parameter by setting the configuration property" as per the readme. |
Yes, I have verified it. To be sure though, here's a slightly modified version of the same project that only enables only Running tslint via command line produces 2 errors as expected, and running via gulp-tslint only produces 1 error, skipping the 📂 no-irregular-whitespace-2.zip |
@panuhorsmalahti any updates or feedback about this? I have a feeling it's probably related to this line in the source of tslint.lint(file.path, file.contents.toString("utf8"), configuration); If this auto-converts things to UTF-8 before linting, then (I think...) it will never be able to detect the unicode characters that the |
gulp-tslint version:
8.1.2
tslint version:
5.8.0
Operating system: Windows 10
I have a TS file that has "irregular whitespace" reported via the
no-irregular-whitespace
tslint rule. I can verify this by running tslint from the command line:which produces this console output
However from the exact same project I have gulp-tslint set up like this:
and calling
gulp lint
produces zero errors! This wa first discovered in vladimir-djokic/TSLint#8 where I thought it was an issue that that project, but I was wrong.I've attached a small demo project: 📂 irregular-whitespace-test.zip
download it and run
npm install
, then rungulp lint
andnpm run lint
to see the different outputs.The text was updated successfully, but these errors were encountered: