I am currently getting a eslint warning on function parameters within Types
or Interfaces
.
Doing the following:
type Test = {
fn: (param: string) => void
}
Results in the following warning:
'param' is defined but never used. Allowed unused args must match /^_/u.
Here's what my .eslintrc.json
looks like:
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json"
},
"env": {
"node": true
},
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"rules": {
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
}
}
Package versions:
"eslint": "^7.23.0"
"@typescript-eslint/eslint-plugin": "^4.22.1"
"@typescript-eslint/parser": "^4.22.1"
Similar questions have been asked already here and here, but the provided answers do not seem to be doing it for me.
Any suggestions as to what could be happening?