Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Supportlang="ts" on all blocks except<template> #207

Open
@Tahul

Description

@Tahul

As for now, I have been using<style lang="ts"> blocks forhttps://pinceau.dev

Most users complained that there is no way to get ESLint working in that context.

I already get syntax coloring and syntax checking from VSCode and TypeScript, aslang="ts" properly triggers it.

Now, I would like to make ESLint compatible with such blocks, whether they are<style> ones or any other<customBlock>.

As seen here, Vue supportscustomBlocks as any other SFCBlock, and so it supportslang="ts" attribute:
https://github.com/vuejs/core/blob/b775b71c788499ec7ee58bc2cf4cd04ed388e072/packages/compiler-sfc/src/parse.ts#L72C3-L72C15

Following a discussion with@ota-meshi, I will try to supportlang="ts" in any other block.

With that feature, anylang="ts" block would be treated as an extension of<script> block and be appended to linted content as is.

That would mean it is not supported to redeclare the same variable name in both blocks, but I think it is expected behavior as a component can only output a single JS chunk anyways.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp