Skip to content

Add opened .vue file to externalFiles#1

Open
doits wants to merge 1 commit into
HerringtonDarkholme:masterfrom
doits:fix_vue_imports
Open

Add opened .vue file to externalFiles#1
doits wants to merge 1 commit into
HerringtonDarkholme:masterfrom
doits:fix_vue_imports

Conversation

@doits

@doits doits commented Mar 15, 2019

Copy link
Copy Markdown

Because vue file not imported from ts file are not included in project

(cherry picked from commit e4f7c8c)


This fixes the problem about imports not found as discussed in dense-analysis/ale#927 (comment) and following.

Without it, imports of components in .vue components always triggered a 2307: Cannot find module '@/components/Component.vue'. error.

With this change, imports now don't trigger an error anymore. Though it seems now all imports of .vue files are considered valid. E.g.:

import NotExistent from "@/components/wrongNameComponent.vue"
// no linting error even though the file does not exist

Since the project won't compile with such an error though, I think this is more acceptable to not display a linting error in this case instead of displaying wrong linting errors for existing files.

Anyway, maybe somebody with more experience can take a look at the change and maybe see why now all imports are considered valid, not only existing ones?

Because vue file not imported from ts file are not included in project

(cherry picked from commit e4f7c8c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants