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

eslintrc: enable more default rules #1463

Merged
merged 5 commits into from
Jan 4, 2022
Merged

eslintrc: enable more default rules #1463

merged 5 commits into from
Jan 4, 2022

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented Jan 4, 2022

Enabling these default rules: @typescript-eslint/no-explicit-any, @typescript-eslint/no-var-requires, react/display-name, react/jsx-key, react/no-unescaped-entities

no-explicit-any warns about 25 more uses of any, but those shouldn't make PRs go red (https://github.com/ansible/ansible-hub-ui/runs/4698268100?check_suite_focus=true#step:4:92), and can be fixed separately

    /home/himdel/ansible-hub-ui/src/components/execution-environment/publish-to-controller-modal.tsx
      353:75  error  `'` can be escaped with `'`, `‘`, `&ansible#39;`, `’`  react/no-unescaped-entities

    /home/himdel/ansible-hub-ui/src/components/repositories/remote-form.tsx
      252:71  error  `'` can be escaped with `'`, `‘`, `&ansible#39;`, `’`  react/no-unescaped-entities

    /home/himdel/ansible-hub-ui/src/containers/execution-environment-detail/tag-manifest-modal.tsx
      222:19  error  `'` can be escaped with `'`, `‘`, `&ansible#39;`, `’`  react/no-unescaped-entities

    /home/himdel/ansible-hub-ui/src/containers/namespace-detail/namespace-detail.tsx
      492:30  error  `'` can be escaped with `'`, `‘`, `&ansible#39;`, `’`  react/no-unescaped-entities

    /home/himdel/ansible-hub-ui/src/containers/token/token-insights.tsx
      92:60  error  `'` can be escaped with `'`, `‘`, `&ansible#39;`, `’`  react/no-unescaped-entities
      177:34  error  `'` can be escaped with `'`, `‘`, `&ansible#39;`, `’`  react/no-unescaped-entities
    /home/himdel/ansible-hub-ui/src/containers/execution-environment-detail/base.tsx
      45:10  error  Component definition is missing display name  react/display-name
…ypress/plugins/

disabling in those 2 locations because both have valid uses of `require` (at least while on node 14)
this is a warning, not an error, so it doesn't cause red prs
=> fixing the easy cases, but leaving some for now
    /home/himdel/ansible-hub-ui/src/components/execution-environment/publish-to-controller-modal.tsx
      210:13  error  Missing "key" prop for element in iterator  react/jsx-key

    /home/himdel/ansible-hub-ui/src/containers/execution-environment-detail/execution_environment_detail_images.tsx
      520:15  error  Missing "key" prop for element in iterator  react/jsx-key

    /home/himdel/ansible-hub-ui/src/containers/execution-environment/registry-list.tsx
      398:7  error  Missing "key" prop for element in array  react/jsx-key

    /home/himdel/ansible-hub-ui/src/containers/task-management/task_detail.tsx
      223:33  error  Missing "key" prop for element in iterator  react/jsx-key
Copy link
Contributor

@MilanPospisil MilanPospisil left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants