I'm using ESLint with TypeScript. When I try to create a function type with some required parameters, ESLint shows error eslint: no-unused-vars.
type Func = (paramA: number) => void Here, paramA is un-used variable according to ESLint.
My .eslintrc.json file
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
}
}
So, what is then, the correct way to create a function type in TypeScript with ESLint?
Thanks in advance