Use tsconfig.json
to define this like so:
"compilerOptions": {
"noUnusedLocals": true,
"noUnusedParameters": true,
I found that its more correct to set these rules in tsconfig than eslint. This prevents you from getting errors/warnings in type definitions. E.g:
type MyType = {
fn: (arg: string) => void;
}
Setting:
//es.config.mjs
"no-unused-vars": "warn",
This would give a warning on the arg
param in the type above, while setting:
//tsconfig.json
"compilerOptions": {
"noUnusedLocals": true,
"noUnusedParameters": true,
does not