简体   繁体   中英

vue.js disable max-len within <template> with eslint-plugin-vue

How can I disable the max-len warnings globally within the <template> </template> tags in the .vue files?

The reason I want to do this is I don't want to write <!-- eslint-disable max-len --> each time.

I also don't want to disable it globally for the whole vue file, so I still want to get a warning within the script tag.

Currently there is no way to do that. Check this thread .

What you can do is use

<!-- eslint-disable --> <!-- eslint-enable -->

inside every template you want to disable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM