我最近一直在与Vue & TypeScript合作,但我就是无法做到这一点:
我正在使用tslint为所有TS脚本提供统一的代码样式,它对所有.ts文件都很有效。问题是,IDE在链接我的.vue文件时使用它的默认设置。
Example.vue:
<template>
<div>Example</div>
</template>
<script lang="ts">
import Component from "vue-class-component"; //<-- not complaining for double-quotes
import Vue from 'vue';
@Component
export default class Example extends Vue {}
</script>如果将相同的代码放入IntelliJ文件中,则会产生.ts IDEA的链接警告。
到目前为止我尝试过的是:
你知道我该怎么做吗?
发布于 2018-03-28 18:20:24
我们有一个特性请求来支持TSLint中的.vue - WEB-31044。如有最新消息,请跟进。请注意,TSLint本身目前不支持linting单文件组件-请参阅https://github.com/palantir/tslint/issues/2099。
https://stackoverflow.com/questions/49521143
复制相似问题