• 请不要在回答技术问题时复制粘贴 AI 生成的内容
yiluo
V2EX  ›  程序员

eslint 自定义插件 - 有大佬帮忙看下吗

  •  
  •   yiluo · Apr 15, 2022 · 1798 views
    This topic created in 1521 days ago, the information mentioned may be changed or developed.

    背景是这样的,公司做国际化的项目,需要对页面每个文本加 vue 的 t 函数,需要放到 lint 里面做校验,但是不能只单独判断 template 里面的 html 文本,因为还会有很多的 JS 变量甚至跨文件的 JS 变量,有没有大佬帮忙看下,lint 这种静态型的扫描工具是不是不能处理这种情况?那如果要做到这种校验的话,能用什么方法呢?

    3 replies    2022-04-15 16:13:32 +08:00
    karott7
        1
    karott7  
       Apr 15, 2022
    我只看过配置文档,但是建议楼主看看 eslint 插件文档,像 react/typescript 语法检测都是插件实现的
    yiluo
        2
    yiluo  
    OP
       Apr 15, 2022
    emmmmmm
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5834 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 06:24 · PVG 14:24 · LAX 23:24 · JFK 02:24
    ♥ Do have faith in what you're doing.