You could silence the ESLint warning by disabling the rule in your .eslintrc.js (or .eslintrc.json, etc.) like this:
..
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
..
}
..
However, I personally prefer to disable the TypeScript warning, since the ESLint rule is a bit more configurable. To disable it in TypeScript, set these compiler options in your tsconfig.json:
..
"compilerOptions": {
"noUnusedLocals": false,
"noUnusedParameters": false,
..
}
..
Now you can for example tweak the ESLint rule to not trigger on identifiers that start with a _, by including this in your .eslintrc.js:
..
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars':
['warn', {argsIgnorePattern: '^_', varsIgnorePattern: '^_'}],
..
}
Note that the base rule no-unused-vars is recommended to always be disabled by the @typescript-eslint/no-unused-vars docs. For an overview of all the options of @typescript-eslint/no-unused-vars, check the no-unused-vars docs, since the options are the same.