-
Notifications
You must be signed in to change notification settings - Fork 8
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
VueComponentPlugin incompatibility #41
Comments
I dont use vuejs, but maybe there is a way to extend tslint config Maybe this can be used? I really dont want vue/react or any framework lib hard coded into type checker. |
@Shepless any idea? I'm using vscode-tslint-vue right now, but that's not working for build time type checking :/ |
@John0x // get typechecker helper
const Typechecker = require('fuse-box-typechecker').TypeHelper
let typechecker = null;
let runTypeChecker = () => {
// same color..
console.log(`\x1b[36m%s\x1b[0m`, `app bundled- running typecheck`);
// I could have had own for the sample...
typechecker = Typechecker({
tsConfig: './tsconfig.json',
name: 'src',
basePath: './',
tsLint: './tslint.json',
yellowOnLint: true,
shortenFilenames:true
})
typechecker.runSync();
} |
@vegarringdal yeah, I'm using the exact same config. |
That is the way it would have been written if the fuse box architecture allowed it. This plugin was built in close collaboration with @nchanged throughout and it was deemed not possible to write it in that way. Therefore I made what I thought was a "halfway house" approach so I didn't need to duplicate every single plugin just for Vue files. Webpack and Fuse are very, very different under the hood - it is not a copy and paste approach with plugins. |
@John0x |
@John0x can you verify if the TypeChecker even picks up .vue files pls? If not - then that is the starting point for this issue for me. |
@Shepless I don't think it does. |
@John0x like I said I have never used (or looked at) the TypeChecker before. However, just a quick look at the README for this project immediately suggests to me that it does not pick up Therefore from what I can see (again without any in depth digging) we have possibly two options:
|
@Shepless shouldn't it be even more generic? This is a pretty common use case, or not? |
@John0x like I mentioned previously the fuse box architecture doesn't allow for that approach to be taken. That was my initial goal - re-use the existing plugin pipeline in the Vue plugin, but it just cannot be done in its current form. So, to repeat the above, I took a "halfway house" approach so we can reuse plugins within the Vue plugin. The only other alternative was to handle transforming manually (i.e. duplicate what other plugins already do) which was obviously a no-go solution. This is why I am suggesting point 2) above - allow the Vue plugin to take an optional TypeChecker/Linter/Code Quality Tool in its options. This way we aren't duplicating what these plugins and/or tools do but they can still be used in single file components. |
@Shepless yeah, I understand :) I could attempt attempt to modify the vue plugin myself tomorrow and create a pull request, or will you do it in the next couple days? |
@John0x Things a little crazy my side at the moment so feel free to push up a PR and if you tag me in it I'll be more than happy to take a look at it. On the architecture side of things - the main blocker was that there was no way to access the already created plugins from the work flow context to then call |
Im just gonna tag this as info only, so other can fin it. |
Hey, the type checking doesn't seem to effect .vue components. I'm using the standard VueComponentPlugin without any fancy configs.
The type checker just prints:
Even though there are obvious errors
The text was updated successfully, but these errors were encountered: