Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor!: Error when using explicit any #214

Merged
merged 1 commit into from
Apr 15, 2023
Merged

refactor!: Error when using explicit any #214

merged 1 commit into from
Apr 15, 2023

Conversation

simenandre
Copy link
Member

@simenandre simenandre commented Apr 14, 2023

Using warn communicate that it can be used. We shouldn't ever use them without a good reason. Therefore I think it makes sense to error out when used without cause.

e.g. this example below shows what I think it makes more sense when they are needed.

/* eslint-disable-next-line @typescript-eslint/no-explicit-any --
 * Here's a very long description about why this configuration is necessary
 * along with some additional information
**/
function helloWorld(thing: any) { ... }

Using `warn` communicate that it _can_ be used. We shouldn't ever use 'em without a good reason, therefore I think it makes sense to error out when they are used without a reason.

e.g.

```
/* eslint-disable-next-line @typescript-eslint/no-explicit-any --
 * Here's a very long description about why this configuration is necessary
 * along with some additional information
**/
function helloWorld(thing: any) { ... }
```
@simenandre simenandre requested a review from a team April 14, 2023 07:55
Copy link
Member

@braaar braaar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any objections

@simenandre simenandre merged commit 5c13293 into main Apr 15, 2023
@delete-merged-branch delete-merged-branch bot deleted the no-any-error branch April 15, 2023 07:41
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants