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

eslint - enable @typescript-eslint/no-unused-vars #1345

Merged
merged 2 commits into from
Dec 14, 2021

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented Dec 8, 2021

enable typescript version of no-unused-vars

configured so we can prepend a _ to purposefully ignored function arguments


Aand fixing the following 81 errors:

/home/himdel/ansible-hub-ui/config/webpack.base.config.js
  40:33  error  'i' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/api/execution-environment-registry.ts
  18:10  error  'id' is defined but never used. Allowed unused args must match /^_/u   @typescript-eslint/no-unused-vars
  18:14  error  'obj' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/api/hub.ts
  1:10  error  'Constants' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/api/remotes.ts
  47:10  error  'id' is defined but never used. Allowed unused args must match /^_/u   @typescript-eslint/no-unused-vars
  47:14  error  'obj' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/collection-detail/collection-content-list.tsx
  9:3  error  'TextInput' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/collection-list/collection-list.tsx
  93:25  error  'e' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/execution-environment-header/execution-environment-header.tsx
  3:19  error  'Button' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/execution-environment/publish-to-controller-modal.tsx
  184:26  error  'controllerCount' is assigned a value but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/execution-environment/repository-form.tsx
  1:13  error  'Trans' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/headers/base-header.tsx
  1:10  error  't' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/headers/collection-header.tsx
  5:20  error  'Link' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/logo/logo.tsx
   1:10  error  'cellWidth' is defined but never used                                @typescript-eslint/no-unused-vars
  62:18  error  'e' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/namespace-form/namespace-form.tsx
  33:39  error  'userId' is assigned a value but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/namespace-modal/namespace-modal.tsx
   6:10  error  'OutlinedQuestionCircleIcon' is defined but never used                     @typescript-eslint/no-unused-vars
  61:27  error  'event' is defined but never used. Allowed unused args must match /^_/u    @typescript-eslint/no-unused-vars
  67:14  error  'results' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/patternfly-wrappers/compound-filter.tsx
  153:51  error  'i' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/permissions/obect-permission-field.tsx
   52:31  error  'i' is defined but never used. Allowed unused args must match /^_/u              @typescript-eslint/no-unused-vars
  118:41  error  'isPlaceholder' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/repositories/local-repository-table.tsx
   4:10  error  'Link' is defined but never used              @typescript-eslint/no-unused-vars
   6:10  error  'DropdownItem' is defined but never used      @typescript-eslint/no-unused-vars
  11:3   error  'StatefulDropdown' is defined but never used  @typescript-eslint/no-unused-vars
  16:10  error  'Paths' is defined but never used             @typescript-eslint/no-unused-vars
  16:17  error  'formatPath' is defined but never used        @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/repositories/remote-form.tsx
  85:21  error  'errorMessages' is assigned a value but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/repositories/remote-repository-table.tsx
  104:26  error  'p' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/sort-table/sort-table.tsx
  2:10  error  't' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/components/user-form/user-form.tsx
  191:24  error  'e' is defined but never used. Allowed unused args must match /^_/u              @typescript-eslint/no-unused-vars
  255:46  error  'isPlaceholder' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/collection-detail/base.ts
  28:13  error  'result' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/collection-detail/collection-docs.tsx
  8:17  error  'TextInputBase' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/collection-detail/collection-import-log.tsx
  130:23  error  'err' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars
  137:19  error  'err' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/edit-namespace/edit-namespace.tsx
  192:15  error  'response' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/execution-environment-detail/base.tsx
  235:17  error  'e' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/execution-environment-detail/execution_environment_detail.tsx
  183:17  error  'error' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/execution-environment-detail/execution_environment_detail_activities.tsx
  231:17  error  'error' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/execution-environment-detail/execution_environment_detail_images.tsx
   47:3   error  'LoadingPageWithHeader' is defined but never used                        @typescript-eslint/no-unused-vars
  501:26  error  'p' is defined but never used. Allowed unused args must match /^_/u      @typescript-eslint/no-unused-vars
  571:17  error  'error' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/execution-environment-detail/tag-manifest-modal.tsx
   54:11  error  'ITagPromises' is defined but never used                                  @typescript-eslint/no-unused-vars
   99:13  error  'children' is assigned a value but never used                             @typescript-eslint/no-unused-vars
  387:18  error  'result' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars
  390:19  error  'err' is defined but never used. Allowed unused args must match /^_/u     @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/execution-environment-manifest/execution-environment-manifest.tsx
   10:3   error  'ClipboardCopy' is defined but never used                              @typescript-eslint/no-unused-vars
  257:15  error  'err' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/execution-environment/registry-list.tsx
  188:24  error  'r' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/login/login.tsx
  6:3  error  'Button' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/my-imports/my-imports.tsx
  301:17  error  'result' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/namespace-detail/namespace-detail.tsx
  182:29  error  'result' is defined but never used. Allowed unused args must match /^_/u    @typescript-eslint/no-unused-vars
  355:19  error  'error' is defined but never used. Allowed unused args must match /^_/u     @typescript-eslint/no-unused-vars
  420:15  error  'response' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/namespace-list/namespace-list.tsx
   12:3   error  'EmptyStateUnauthorized' is defined but never used                   @typescript-eslint/no-unused-vars
  20:3  error  'AlertType' is defined but never used  @typescript-eslint/no-unused-vars
  302:22  error  'i' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/repositories/repository-list.tsx
  135:26  error  'r' is defined but never used. Allowed unused args must match /^_/u       @typescript-eslint/no-unused-vars
  234:46  error  'result' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/settings/user-profile.tsx
   6:3   error  'Link' is defined but never used         @typescript-eslint/no-unused-vars
  47:11  error  'id' is assigned a value but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/task-management/task_detail.tsx
  22:3  error  'Tooltip' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/user-management/delete-user-modal.tsx
  86:20  error  'result' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/user-management/user-create.tsx
  80:14  error  'result' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/user-management/user-detail.tsx
  19:3  error  'BaseHeader' is defined but never used   @typescript-eslint/no-unused-vars
  20:3  error  'Breadcrumbs' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/containers/user-management/user-edit.tsx
  7:3  error  'Breadcrumbs' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/loaders/insights/insights-loader.js
  80:22  error  'prevProps' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/src/loaders/standalone/standalone-loader.tsx
  76:22  error  'prevProps' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/test/cypress/integration/collection.js
  40:38  error  'res' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/test/cypress/integration/collections_list.js
  1:17  error  'sortBy' is defined but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/test/cypress/integration/group_permissions.js
  88:37  error  'request' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/test/cypress/integration/profile.js
  35:47  error  'index' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars
  35:54  error  '$list' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/test/cypress/plugins/console-logger.js
  39:10  error  'logEntry' is defined but never used               @typescript-eslint/no-unused-vars
  98:9   error  'prefixSpacer' is assigned a value but never used  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/test/cypress/plugins/index.js
  18:23  error  'config' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

/home/himdel/ansible-hub-ui/test/cypress/support/commands.js
   28:7   error  'urljoin' is assigned a value but never used                                @typescript-eslint/no-unused-vars
   60:37  error  'response' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars
  354:34  error  'request' is defined but never used. Allowed unused args must match /^_/u   @typescript-eslint/no-unused-vars
  373:35  error  'request' is defined but never used. Allowed unused args must match /^_/u   @typescript-eslint/no-unused-vars

✖ 81 problems (81 errors, 0 warnings)

@himdel himdel marked this pull request as draft December 8, 2021 01:10
@himdel himdel marked this pull request as ready for review December 8, 2021 01:59
@himdel himdel merged commit dd91b82 into ansible:master Dec 14, 2021
@himdel himdel deleted the eslint-no-unused branch December 14, 2021 13:57
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.

2 participants