V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
weekidjoker
V2EX  ›  程序员

eslint-plugin-vue-unused-autofix 帮助移除 vue 项目中未使用的组件和属性

  •  
  •   weekidjoker · 28 天前 · 519 次点击

    项目链接:eslint-plugin-vue-unused-autofix

    项目简介

    扩展 eslint-plugin-vueno-unused-componentsno-unused-properties 规则,实现自动修复

    动机

    项目中可能因为历史原因,遗留了很多未使用的属性,eslint-plugin-vue 只是进行提示而已,没有自动移除,一个个删除也很麻烦,所以进行扩展,让 eslint autofix 。

    其他

    目前 no-unused-properties 只对 propsmapState|mapGetters|mapMutations|mapActions 有效,因为 data ,computed 和 methods 有可能被其他组件使用。options 中有 mixinsextends 也会跳过。怎么更好地清除 data ,computed 和 methods ?

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2843 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 07:07 · PVG 15:07 · LAX 00:07 · JFK 03:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.