-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
TSlint rule "no-consecutive-blank-lines" doesn't work with vue-service tslint
#1766
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
Comments
It's explained in the comment just above:
|
So @Akryum, why, there is a different behaviour between Note: the problem is not with the Vue file but with the dedicated TypeScript file. Is there a documentation to explain why some tslint rules are not allowed? |
It wans't clear to me from your issue. |
I guess its because npm run serve runs tslint as part of a webpack build process and npm run lint calls a monkey-patched tslint directly. in the webpack process the rule isnt disabled. |
Exactly. And we patch tslint in the |
Version
3.0.0-rc.3
Reproduction link
https://github.com/hdurix/vue-consecutive-empty-lines
Steps to reproduce
Create a TypeScript project using vue cli.
Set
no-consecutive-blank-lines
to true (or remove it) intslint.json
Change HelloWorld.vue to extract TypeScript in a dedicated file (HelloWorld.ts)
In HelloWorld.ts, add two consecutive empty lines.
In App.vue, add
// @ts-ignore
before theimport
statement (more information in #1576)Launch
npm run lint
.What is expected?
Consecutive empty lines are replaced by only one empty line.
What is actually happening?
The prompt says: No lint errors found.
The same thing works if we call directly
tslint
usingtslint --project . --fix
or if we runnpm run serve
.I think, it comes from:
vue-cli/packages/@vue/cli-plugin-typescript/lib/tslint.js
Lines 24 to 26 in 838f6a2
The text was updated successfully, but these errors were encountered: