Skip to content

[monorepo] Remove "noUnusedLocals" and "noUnusedParameters" from "tsconfig.base.json" #4871

@Zamiell

Description

@Zamiell

Recently, I have been working on some PRs for typescript-eslint, and I have noticed a bug in the setup of this repository.

In the tsconfig.base.json file, the "noUnusedLocals" and the "noUnusedParameters" compiler flags are specified. Normally, turning these on these flags provides extra safety for a TypeScript project. However, if the repository also uses the "@typescript-eslint/no-unused-vars" rule, then these compiler warnings become (mostly) superfluous.

For example, this unused variable triggers a buggy rule overlap:

image

The solution for this is to either turn the compiler flags off, or to turn the ESLint rule off.

This conflict is discussed in more detail in issue #4641 by Brad. Brad says that in general, he recommends that you use the ESLint rule over the compiler flags. This is what I have been doing in my own projects as well. I like it because ESLint has the feature where you can quickly ignore the warning by prefixing the variable with an underscore. (The TypeScript compiler does not understand this, and will continue to warn you about the variable even after putting an underscore on it.)

I think Brad's advice should also be applied to this monorepo as well, thus this issue.

Finally, a maintainer should remove the package: eslint-plugin tag; I had to choose this arbitrarily since there did not seem to be an issue template for issues relating to the monorepo itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinggood first issueGood for newcomersrepo maintenancethings to do with maintenance of the repo, and not with code/docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy