argsIgnorePattern

argsIgnorePattern 选项指定不检查用法的异常:名称与正则表达式模式匹配的参数。例如,名称以下划线开头的变量。

The argsIgnorePattern option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.

PBTRmB1WG8WNd0ISrbw9ORN2N5xiM4XyB5ccm4XtorSa9ATala3k1G1WEeGVxe6b63nPhwn9EN9RWpnMpQ129BpbL5ar9dmV7L4vWI1IiCpfNK+M+lOdLCO9vQZdXs310/l5kM9QcAvYu3SOP0wU2mgts3OPoI3zyL+aF3RMugKpyZa1yTXmn1qCSd6yoGrWYoLyTw9FLOdCydUsMuIYh6EC3fVOSVvOUsXNwZ8Eth+NDn3jfPmUTkXLbsRTYKz/+9P9joV9crxVaU48CJNW5g==

/*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/

function foo(x, _y) {
    return x + 1;
}
foo();