vuejs/vue-eslint-parser

How to apply different rules for sfc file based on script tag "lang"

languanghao opened this issue · 1 comments

I want to migrate my project from vue2 (sfc with javascript) to vue3 (sfc with typescript), but vue sfc file only apply rules under *.vue.

Is it possible to config eslint use different rules by <script lang='js/ts'>?

We cannot configure rules per lang attribute.

If you really want to do that, you'll have to use a trick to parse and configure each file yourself.
sveltejs/eslint-plugin-svelte#152 (comment)