Today I learned how to fix no-unused-vars with typescript
I don't know why, but in my current project with TypeScript, there were two rules for unused vars.
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}
],
"@typescript-eslint/no-unused-vars": [
"error",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}
],
So basically they conflicted with each other and sometimes throw incorrect errors. The solution for this kind of problem is:
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"]
After this, my ESLint started working just perfect :)
Thank you.