fix: eslint no-unused vars violations and setup
@typescript-eslint documents recommends turning off the base unused-vars rule in eslint explicitly and using '@typescript-eslint/no-unused var' instead. In this case, the base rule failed to correctly report enums. (reported unused even though they were used). Also, fixed two unused variables by adding ignore pattern '_'.
This commit is contained in:
parent
e8ff68f0b3
commit
21433049b8
|
@ -116,7 +116,8 @@
|
|||
"no-unexpected-multiline": 2,
|
||||
"no-unneeded-ternary": [2, { "defaultAssignment": false }],
|
||||
"no-unreachable": 2,
|
||||
"no-unused-vars": [2, { "vars": "local", "args": "none", "varsIgnorePattern": "^_" }],
|
||||
"no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": [2, { "vars": "local", "args": "none", "varsIgnorePattern": "^_" }],
|
||||
"no-useless-call": 2,
|
||||
"no-useless-constructor": 2,
|
||||
"no-with": 2,
|
||||
|
|
2
nip29.ts
2
nip29.ts
|
@ -144,7 +144,7 @@ export function validateGroupAdminsEvent(event: Event): boolean {
|
|||
}
|
||||
|
||||
// validate permissions
|
||||
for (const [tag, value, label, ...permissions] of event.tags) {
|
||||
for (const [tag, _value, _label, ...permissions] of event.tags) {
|
||||
if (tag !== 'p') continue
|
||||
|
||||
for (let i = 0; i < permissions.length; i += 1) {
|
||||
|
|
Loading…
Reference in New Issue