-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Tighten TypeScript linting #2684
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 28 of 29 files at r1, all commit messages.
Reviewable status: 28 of 29 files reviewed, all discussions resolved (waiting on @imnasnainaec)
src/components/AppBar/UserMenu.tsx
line 116 at r1 (raw file):
// <Menu> automatically applies a ref to its first child for anchoring. The // following prevents a console warning: "Function components cannot be given refs. // Attempts to access this ref will fail. Did you mean to use React.forwardRef()?"
This comment looks outdated.
Code quote:
// <Menu> automatically applies a ref to its first child for anchoring. The
// following prevents a console warning: "Function components cannot be given refs.
// Attempts to access this ref will fail. Did you mean to use React.forwardRef()?"
src/components/Login/LoginPage/tests/LoginComponent.test.tsx
line 15 at r1 (raw file):
"@matt-block/react-recaptcha-v2", () => function MockRecaptcha() {
What do we make happy by naming this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 27 of 29 files reviewed, all discussions resolved (waiting on @imnasnainaec and @jasonleenaylor)
src/components/AppBar/UserMenu.tsx
line 116 at r1 (raw file):
Previously, jasonleenaylor (Jason Naylor) wrote…
This comment looks outdated.
Affirmed and retired.
src/components/Login/LoginPage/tests/LoginComponent.test.tsx
line 15 at r1 (raw file):
Previously, jasonleenaylor (Jason Naylor) wrote…
What do we make happy by naming this function?
https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)
Closes #1217
Applies
"plugin:@typescript-eslint/recommended"
(except for"@typescript-eslint/no-explicit-any": "off",
and a few specific exceptions to other rules).Also, changes some of our
"off"
s to"warn"
s (with"react/display-name": "off",
removed because it is"warn"
by default with our"extends":
content).Also, changes
"unused-imports/no-unused-imports"
from"error"
to"warn"
for developer convenience.This change is