Skip to content

Have a better parseComponent #532

@octref

Description

@octref

Have a typed version of vue-template-compiler.parseComponent.
We still need the html parser, but the top level region dividing can be done using a simpler version.

Maybe base it on parse5. Same approach as https://github.com/prograhammer/vscode-tslint-vue.
This can be reused by a lot of third parties, such as ESLint, TSLint, formatters, etc which are only interested in a specific region of .vue file.
Should also output offsets, so linting error can be shown at right place, formatted code can be placed to right place, etc.

Ideally later we'd also want to use Vue's own parser for <template> region, so we get a richer AST for vue specific stuff.

In short term, we should disable scaffoldCompletions in custom blocks.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions