Skip to content

chore: fix eslint not working as it should#392

Merged
Venefilyn merged 2 commits into
packit:mainfrom
Venefilyn:chore/fix-eslint-not-working
May 21, 2024
Merged

chore: fix eslint not working as it should#392
Venefilyn merged 2 commits into
packit:mainfrom
Venefilyn:chore/fix-eslint-not-working

Conversation

@Venefilyn

@Venefilyn Venefilyn commented Apr 6, 2024

Copy link
Copy Markdown
Collaborator

ESLint wasn't configured correctly and wasn't run as it should. This
enables it and also extends it with more rules to also cover TypeScript.

TODO:

  • Write new tests or update the old ones to cover new functionality.
  • Update doc-strings where appropriate.
  • Update or write new documentation in packit/packit.dev.
  • ‹fill in›

Fixes

Related to

Merge before/after

RELEASE NOTES BEGIN
Fix ESLint not working correct and align Prettier with pre-commit
RELEASE NOTES END

@usercont-release-bot

usercont-release-bot commented Apr 6, 2024

Copy link
Copy Markdown

Preview: https://packit-dashboard-pr-392.surge.sh (deployed at Fri 17 May 2024, 17:21 UTC)

@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

Venefilyn added a commit to Venefilyn/dashboard that referenced this pull request Apr 7, 2024
Some dependencies to `useMemo` in ResultProgressStep wasn't updated and
didn't render properly. This should have been caught by linting when
this was being implemented. The linting should be fixed by packit#392
lachmanfrantisek pushed a commit to Venefilyn/dashboard that referenced this pull request Apr 8, 2024
Some dependencies to `useMemo` in ResultProgressStep wasn't updated and
didn't render properly. This should have been caught by linting when
this was being implemented. The linting should be fixed by packit#392
github-merge-queue Bot pushed a commit that referenced this pull request Apr 8, 2024
Some dependencies to `useMemo` in ResultProgressStep wasn't updated and
didn't render properly. This should have been caught by linting when
this was being implemented. The linting should be fixed by #392
ESLint wasn't configured correctly and wasn't run as it should. This
enables it and also extends it with more rules to also cover TypeScript.
@Venefilyn Venefilyn force-pushed the chore/fix-eslint-not-working branch from 2c0eb3b to a486775 Compare May 17, 2024 17:02
@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

@Venefilyn Venefilyn force-pushed the chore/fix-eslint-not-working branch from a486775 to 07c37cb Compare May 17, 2024 17:20
@Venefilyn Venefilyn marked this pull request as ready for review May 17, 2024 17:21
@Venefilyn

Copy link
Copy Markdown
Collaborator Author

Current issues not fixed. But ready for review @lachmanfrantisek @lbarcziova

yarn lint output
dashboard/frontend on  chore/fix-eslint-not-working via  v20.11.1 took 8s 
❯ yarn lint                  
yarn run v1.22.19
$ eslint src/

/var/home/spytec/projects/packit/dashboard/frontend/src/app/AppLayout/AppLayout.tsx
   56:33  error  Unsafe member access .label on an `any` value                                            @typescript-eslint/no-unsafe-member-access
   57:32  error  Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`   @typescript-eslint/no-unsafe-argument
   57:53  error  Unsafe member access .label on an `any` value                                            @typescript-eslint/no-unsafe-member-access
   58:35  error  Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`   @typescript-eslint/no-unsafe-argument
   58:56  error  Unsafe member access .category on an `any` value                                         @typescript-eslint/no-unsafe-member-access
   75:23  error  Unsafe argument of type `any` assigned to a parameter of type `object`                   @typescript-eslint/no-unsafe-argument
   75:61  error  Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<boolean>`  @typescript-eslint/no-unsafe-argument
   75:67  error  Unsafe member access .mobileView on an `any` value                                       @typescript-eslint/no-unsafe-member-access
  144:12  error  Unsafe assignment of an `any` value                                                      @typescript-eslint/no-unsafe-assignment
  144:25  error  Unsafe member access .label on an `any` value                                            @typescript-eslint/no-unsafe-member-access
  145:54  error  Unsafe member access .label on an `any` value                                            @typescript-eslint/no-unsafe-member-access
  148:23  error  Unsafe member access .label on an `any` value                                            @typescript-eslint/no-unsafe-member-access
  157:29  error  Unsafe member access .category on an `any` value                                         @typescript-eslint/no-unsafe-member-access
  158:42  error  Unsafe argument of type `any` assigned to a parameter of type `string`                   @typescript-eslint/no-unsafe-argument
  158:55  error  Unsafe member access .category on an `any` value                                         @typescript-eslint/no-unsafe-member-access
  160:32  error  Unsafe member access .category on an `any` value                                         @typescript-eslint/no-unsafe-member-access
  160:58  error  Unsafe member access .category on an `any` value                                         @typescript-eslint/no-unsafe-member-access
  162:34  error  Unsafe argument of type `any` assigned to a parameter of type `string`                   @typescript-eslint/no-unsafe-argument
  162:47  error  Unsafe member access .category on an `any` value                                         @typescript-eslint/no-unsafe-member-access
  165:22  error  Unsafe assignment of an `any` value                                                      @typescript-eslint/no-unsafe-assignment
  165:35  error  Unsafe member access .category on an `any` value                                         @typescript-eslint/no-unsafe-member-access
  166:24  error  Unsafe assignment of an `any` value                                                      @typescript-eslint/no-unsafe-assignment
  166:37  error  Unsafe member access .category on an `any` value                                         @typescript-eslint/no-unsafe-member-access
  167:63  error  Unsafe member access .category on an `any` value                                         @typescript-eslint/no-unsafe-member-access
  168:67  error  Unsafe member access .category on an `any` value                                         @typescript-eslint/no-unsafe-member-access
  181:11  error  Unsafe return of an `any` typed value                                                    @typescript-eslint/no-unsafe-return
  182:27  error  Unsafe member access .label on an `any` value                                            @typescript-eslint/no-unsafe-member-access

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Jobs/BodhiUpdatesTable.tsx
  57:33  error  Unsafe argument of type `any` assigned to a parameter of type `BodhiUpdate[]`  @typescript-eslint/no-unsafe-argument

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Jobs/CoprBuildsTable.tsx
  95:33  error  Unsafe argument of type `any` assigned to a parameter of type `CoprBuild[]`  @typescript-eslint/no-unsafe-argument

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Jobs/KojiBuildsTable.tsx
  62:33  error  Unsafe argument of type `any` assigned to a parameter of type `KojiBuild[]`  @typescript-eslint/no-unsafe-argument

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Jobs/SRPMBuildsTable.tsx
  56:33  error  Unsafe argument of type `any` assigned to a parameter of type `SRPMBuild[]`  @typescript-eslint/no-unsafe-argument

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Jobs/SyncReleaseStatuses.tsx
  89:33  error  Unsafe argument of type `any` assigned to a parameter of type `UpstreamDownstreamJobs[]`  @typescript-eslint/no-unsafe-argument

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Jobs/TestingFarmResultsTable.tsx
  54:33  error  Unsafe argument of type `any` assigned to a parameter of type `TestingFarmResult[]`  @typescript-eslint/no-unsafe-argument

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Pipelines/PipelinesTable.tsx
  204:28  error  Unsafe assignment of an `any` value  @typescript-eslint/no-unsafe-assignment

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Projects/BranchList.tsx
  55:3  error  Unsafe return of an `any` typed value  @typescript-eslint/no-unsafe-return

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Projects/ProjectInfo.tsx
  47:3  error  Unsafe return of an `any` typed value  @typescript-eslint/no-unsafe-return

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Projects/ProjectsList.tsx
  67:5  error  Unsafe return of type `Promise<any>` from function with return type `Promise<Project>`  @typescript-eslint/no-unsafe-return

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Projects/PullRequestList.tsx
  53:3   error  Unsafe return of an `any` typed value                                   @typescript-eslint/no-unsafe-return
  74:43  error  Unsafe argument of type `any` assigned to a parameter of type `string`  @typescript-eslint/no-unsafe-argument

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Projects/ReleasesList.tsx
  14:3  error  Unsafe return of type `Promise<any>` from function with return type `Promise<ProjectRelease[]>`  @typescript-eslint/no-unsafe-return

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Results/ResultsPageBodhiUpdate.tsx
  94:34  error  Unsafe assignment of an `any` value  @typescript-eslint/no-unsafe-assignment
  94:61  error  Unsafe assignment of an `any` value  @typescript-eslint/no-unsafe-assignment

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Results/ResultsPageTestingFarm.tsx
  157:3  error  Unsafe return of type `Promise<any>` from function with return type `Promise<TestingFarmOverview | { error: string; }>`  @typescript-eslint/no-unsafe-return

/var/home/spytec/projects/packit/dashboard/frontend/src/app/StatusLabel/BaseStatusLabel.tsx
  50:64  error  Unsafe assignment of an `any` value  @typescript-eslint/no-unsafe-assignment

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Usage/UsageInterval.tsx
  104:11  error  Unsafe assignment of an `any` value                                                                        @typescript-eslint/no-unsafe-assignment
  105:11  error  Unsafe assignment of an `any` value                                                                        @typescript-eslint/no-unsafe-assignment
  105:36  error  Unsafe call of an `any` typed value                                                                        @typescript-eslint/no-unsafe-call
  105:47  error  Unsafe member access .map on an `any` value                                                                @typescript-eslint/no-unsafe-member-access
  106:34  error  Unsafe argument of type `any` assigned to a parameter of type `string`                                     @typescript-eslint/no-unsafe-argument
  107:29  error  Unsafe argument of type `any` assigned to a parameter of type `string`                                     @typescript-eslint/no-unsafe-argument
  109:11  error  Unsafe assignment of an `any` value                                                                        @typescript-eslint/no-unsafe-assignment
  109:27  error  Unsafe call of an `any` typed value                                                                        @typescript-eslint/no-unsafe-call
  109:38  error  Unsafe member access .map on an `any` value                                                                @typescript-eslint/no-unsafe-member-access
  109:48  error  'i' is defined but never used. Allowed unused args must match /^_/u                                        @typescript-eslint/no-unused-vars
  110:20  error  Unsafe argument of type `any` assigned to a parameter of type `[{ name: string; x: string; y: number; }]`  @typescript-eslint/no-unsafe-argument
  110:32  error  Unsafe member access [key] on an `any` value                                                               @typescript-eslint/no-unsafe-member-access
  110:32  error  Computed name [key] resolves to an any value                                                               @typescript-eslint/no-unsafe-member-access
  110:38  error  Unsafe argument of type `any` assigned to a parameter of type `string`                                     @typescript-eslint/no-unsafe-argument
  124:53  error  Unsafe member access .y on an `any` value                                                                  @typescript-eslint/no-unsafe-member-access
  128:37  error  Unsafe assignment of an `any` value                                                                        @typescript-eslint/no-unsafe-assignment
  129:43  error  Unsafe return of an `any` typed value                                                                      @typescript-eslint/no-unsafe-return
  129:49  error  Unsafe member access .x on an `any` value                                                                  @typescript-eslint/no-unsafe-member-access
  136:29  error  Unsafe assignment of an `any` value                                                                        @typescript-eslint/no-unsafe-assignment
  163:57  error  'color' is defined but never used. Allowed unused args must match /^_/u                                    @typescript-eslint/no-unused-vars
  165:49  error  Unsafe argument of type `any` assigned to a parameter of type `string`                                     @typescript-eslint/no-unsafe-argument
  166:10  error  Unsafe call of an `any` typed value                                                                        @typescript-eslint/no-unsafe-call
  166:19  error  Unsafe member access .map on an `any` value                                                                @typescript-eslint/no-unsafe-member-access
  167:11  error  Missing "key" prop for element in iterator                                                                 react/jsx-key
  170:19  error  Unsafe assignment of an `any` value                                                                        @typescript-eslint/no-unsafe-assignment
  171:35  error  Unsafe assignment of an `any` value                                                                        @typescript-eslint/no-unsafe-assignment
  173:14  error  Unsafe call of an `any` typed value                                                                        @typescript-eslint/no-unsafe-call
  173:22  error  Unsafe member access .replace on an `any` value                                                            @typescript-eslint/no-unsafe-member-access
  183:22  error  Unsafe argument of type `any` assigned to a parameter of type `{}`                                         @typescript-eslint/no-unsafe-argument
  184:51  error  Unsafe member access [job] on an `any` value                                                               @typescript-eslint/no-unsafe-member-access

/var/home/spytec/projects/packit/dashboard/frontend/src/app/Usage/UsageList.tsx
  144:51  error  Unsafe member access .x on an `any` value                               @typescript-eslint/no-unsafe-member-access
  144:63  error  Unsafe member access .y on an `any` value                               @typescript-eslint/no-unsafe-member-access
  167:51  error  Unsafe member access .x on an `any` value                               @typescript-eslint/no-unsafe-member-access
  198:47  error  Unsafe member access .x on an `any` value                               @typescript-eslint/no-unsafe-member-access
  198:59  error  Unsafe member access .y on an `any` value                               @typescript-eslint/no-unsafe-member-access
  283:51  error  Unsafe member access .name on an `any` value                            @typescript-eslint/no-unsafe-member-access
  283:66  error  Unsafe member access .y on an `any` value                               @typescript-eslint/no-unsafe-member-access
  330:7   error  Unsafe argument of type `any` assigned to a parameter of type `number`  @typescript-eslint/no-unsafe-argument

/var/home/spytec/projects/packit/dashboard/frontend/src/app/utils/LabelLink.tsx
  22:48  error  Unsafe assignment of an `any` value  @typescript-eslint/no-unsafe-assignment

✖ 83 problems (83 errors, 0 warnings)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

@lbarcziova lbarcziova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice, thanks!

@lachmanfrantisek lachmanfrantisek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't understand much but thanks!

@Venefilyn Venefilyn added this pull request to the merge queue May 21, 2024
Merged via the queue into packit:main with commit 575078f May 21, 2024
@Venefilyn Venefilyn deleted the chore/fix-eslint-not-working branch May 21, 2024 19:31
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.

4 participants