V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
weekidjoker
V2EX  ›  程序员

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

  •  
  •   weekidjoker · Mar 29, 2024 · 1385 views
    This topic created in 769 days ago, the information mentioned may be changed or developed.

    项目链接: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 ?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5536 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 66ms · UTC 01:30 · PVG 09:30 · LAX 18:30 · JFK 21:30
    ♥ Do have faith in what you're doing.