chore: update ESLint rule

use explicit 'toArray' over the vague 'get'
This commit is contained in:
Tony 2024-07-11 02:14:38 +08:00
parent f256c9707a
commit 06a6db7ff7
1 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,12 @@ export default [{
'no-multi-str': 'error',
'no-new-func': 'error',
'no-restricted-imports': 'error',
'no-restricted-syntax': ['warn', {
selector: "CallExpression[callee.property.name='get'][arguments.length=0]",
message: "Please use toArray instead.",
}],
'no-unneeded-ternary': 'error',
'no-useless-computed-key': 'error',
'no-useless-concat': 'warn',