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

Tighten TypeScript linting #2684

Merged
merged 5 commits into from
Oct 11, 2023
Merged

Tighten TypeScript linting #2684

merged 5 commits into from
Oct 11, 2023

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Oct 5, 2023

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 Reviewable

@imnasnainaec imnasnainaec added frontend maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. labels Oct 5, 2023
@imnasnainaec imnasnainaec self-assigned this Oct 5, 2023
Copy link
Contributor

@jasonleenaylor jasonleenaylor left a 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?

Copy link
Collaborator Author

@imnasnainaec imnasnainaec left a 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

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec merged commit 42cc273 into master Oct 11, 2023
17 checks passed
@imnasnainaec imnasnainaec deleted the typescript-eslint branch October 11, 2023 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure that ESLint is properly configured for TypeScript
2 participants