Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upGet "No unused variables" Error when import type definitions in TypeScript #1291
Comments
This comment has been minimized.
This comment has been minimized.
despian
commented
Jun 20, 2019
|
You can fix this per file by adding: /* eslint no-unused-vars: "off" */
/* eslint @typescript-eslint/no-unused-vars: "error" */Obviously, this isn't a great solution for projects with many .ts files. I think #1283 address this and some other issues better. |
This comment has been minimized.
This comment has been minimized.
|
I'd like to have solve this in a future version of
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error"
}Let's close this issue in favor of: #1283 (comment) |
feross
closed this
Aug 11, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kiochan commentedJun 4, 2019
What version of standard?
12.0.1
What operating system, Node.js, and npm version?
OS: Mac OS X 10.14.5 18F132
Node.js version: v12.0.0
Yarn version: 1.16.0
What did you expect to happen?
I want format my typescript code use
standard **/*.ts --fixand I run standard with@typescript-eslint/parserand@typescript-eslint/eslint-plugin.It should be error free.
package.json
{ "standard": { "parser": "@typescript-eslint/parser", "plugins": [ "@typescript-eslint/eslint-plugin" ] } }types.ts
test.ts
What actually happened?
It caused an error below: