Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想编写类似Haskell 通配符的语法:
let [_, a] = [1, 2];
因为我只想使用a.
a
但eslint警告我声明_,从未使用过。
eslint
_
您可以配置此规则以忽略匹配特定模式的变量:
{ "rules": { "no-unused-vars": [2, {"varsIgnorePattern": "^_$"}] } }