Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo: no-unused-vars #239

Closed
tylerlong opened this issue Mar 5, 2023 · 1 comment
Closed

Typo: no-unused-vars #239

tylerlong opened this issue Mar 5, 2023 · 1 comment

Comments

@tylerlong
Copy link

tylerlong commented Mar 5, 2023

/**
* 已定义的变量必须使用
*/
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
/**

既然说了必须使用,那为什么又是off? 貌似只有TS才有这个问题。

在 base 里面的定义是正确的:

eslint-config-alloy/base.js

Lines 772 to 782 in e457248

/**
* 已定义的变量必须使用
*/
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'none',
ignoreRestSiblings: false,
caughtErrors: 'none',
},

@xcatliu
Copy link
Member

xcatliu commented Mar 6, 2023

既然说了必须使用,那为什么又是off?

「已定义的变量必须使用」,是对 no-unused-vars 规则的解释,off 表示关闭这个规则。

这里应该开启,在 #182 跟进吧

@xcatliu xcatliu closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants