Skip to content
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

Add “no any” lint rule #600

Open
kriskowal opened this issue Mar 5, 2021 · 3 comments
Open

Add “no any” lint rule #600

kriskowal opened this issue Mar 5, 2021 · 3 comments
Assignees
Labels
kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024

Comments

@kriskowal
Copy link
Member

TypeScript added the unknown to fix some liberties that are allowed with the any type that can result in runtime errors. I think this was allowing access of properties of null, for example.

Valid uses of any are vanishingly unlikely. We have some consensus to require a rationale in review. Let’s go farther and add a lint rule. There appear to be plugins we can try.

https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-explicit-any.md

@dckc
Copy link
Contributor

dckc commented Mar 5, 2021

Oh nice... I didn't realize tool support was feasible.

@dckc
Copy link
Contributor

dckc commented Apr 23, 2021

I just wrestled with this for half an hour or so in the nat package and couldn't get it to work.

It looks like the typescript-eslint doesn't check jsdoc.

see also jsdoctypeparser/jsdoctypeparser#50

@michaelfig
Copy link
Member

michaelfig commented Oct 1, 2021

Ideally, we would turn on stricter checking in the eslint-config package. See Agoric/agoric-sdk#3916.

@kriskowal kriskowal added the kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024 label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024
Projects
None yet
Development

No branches or pull requests

3 participants