-
Notifications
You must be signed in to change notification settings - Fork 887
Lint other then *.ts file extensions #3361
Comments
Currently there is no easy way to make it work. Simply adding an option like IIRC there's a vue loader for webpack which can be combined with the tslint-loader. Using them with Recently I was thinking about a loader concept in tslint. It would extract the typescript source code from your file and map the errors produced by tslint to your actual file positions. |
Thanks for quick response! Ok, I see. Do you think this would be implemented in observable feature? For now I would probably go with webpack+tslint approach until the project is small |
There's already an open issue requesting support for .vue files: #2099 Closing this as a duplicate. |
@ajafff having a related issue:
I cannot get |
That's actually a different problem. I assume |
@ajafff that's correct. Odd that the message suggests that something is wrong with the extension. In any case, I'd rather keep them excluded because I don't want the tests to end up in my |
@martijnthe the problem with the error message is known: #2208. I have already submitted a PR to fix it. If you want type checking in your tests, you have no better option than what you mentioned above. |
@ajaff thanks! |
I have a vue.js project with basic vue-webpack-template setup that I'm moving to TypeScript and TSLint. And I need to lint my project using CLI. So I came up with this command:
It works well for
*.ts
files, but when one of them imports*.vue
files (which is allowed in webpack) it throws this errorError at src/main.ts:4:17: Cannot find module './App.vue'
.Is there any way to make it lint the
*.vue
files? I know that in eslint there is a CLI option--ext
that allows to do stuff likeeslint --ext .js,.vue src
. But I couldn't find anything like that in tslint.There is a way to lint my project with Webpack on every file save but I know that this is a very slow process especially when the project get's bigger.
The text was updated successfully, but these errors were encountered: