New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linting warnings in a new project #4684
Comments
You can use a function that looks like this instead and then not have those errors. This is an issue of an aggressive linter, not a problem with the framework. @Field(() => ID) And now there's no linting error. |
Awesome, thanks for the quick response. |
You can also modify your .eslintrc.js file to include the following: module.exports = {
rules: {
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
},
}; This disables the |
Sorry for bringing back this thread, but I'm experiencing a similar problem with the
The linter is throwing a |
This looks like something that would be reported to the Typescript-eslint repository. It might be trusted to a new change dealing with decorators and exported types |
@jmcdo29 Sounds good, will do. Thanks for the quick response. |
In case anyone ends up here in the future, the problem I was experiencing was related to |
Bug Report
I'm starting a new GraphQL project, following the code-first approach, but I'm getting a bunch of linting warning for rule
@typescript-eslint/no-unused-vars
whenever@Field
is used.I see the same is happening with the following sample project: https://github.com/nestjs/nest/tree/master/sample/23-graphql-code-first
I don't want to disable the rule altogether, other than disabling the rule for each line, would there be a way to address this in the code?
Steps to reproduce
git clone git@github.com:nestjs/nest.git cd nest/sample/23-graphql-code-first yarn yarn run lint
Current behavior
Expected behavior
No warnings
Environment
Nest version: 7.0.9
For Tooling issues:
The text was updated successfully, but these errors were encountered: