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

Fix lint issues #450

Open
4 of 8 tasks
NoamGaash opened this issue Jan 31, 2024 · 7 comments
Open
4 of 8 tasks

Fix lint issues #450

NoamGaash opened this issue Jan 31, 2024 · 7 comments
Assignees
Labels
ci improvements to our CI pipeline frontend frontend developers issue good first issue Good for newcomers hacktoberfest low priority
Milestone

Comments

@NoamGaash
Copy link
Member

NoamGaash commented Jan 31, 2024

open eslint.config.js
delete lines with rules that are turned 'off'. After deleting each line, run npm run lint, fix all warnings, and commit the changes.
It's recommended to make multiple pull requests, in order to break down this task,
this task can have multiple assignees.

  • '@typescript-eslint/no-unsafe-call': 'off',
  • '@typescript-eslint/no-unsafe-member-access': 'off',
  • '@typescript-eslint/no-unsafe-return': 'off',
  • '@typescript-eslint/no-floating-promises': 'off',
  • '@typescript-eslint/restrict-template-expressions': 'off',
  • '@typescript-eslint/no-base-to-string': 'off',
  • '@typescript-eslint/no-unsafe-assignment': 'off',
  • '@typescript-eslint/no-unsafe-argument': 'off',

also, deleting eslint-disable comments would be amazing.

@NoamGaash NoamGaash added good first issue Good for newcomers hacktoberfest ci improvements to our CI pipeline frontend frontend developers issue low priority labels Jan 31, 2024
@LightDDark
Copy link
Collaborator

@NoamGaash can you assign this issue to me?

@NoamGaash
Copy link
Member Author

NoamGaash commented Feb 1, 2024

@LightDDark sure!
please use the checkboxes in the issue description to tell everyone what you're working on

@LightDDark
Copy link
Collaborator

Thank you!

  • '@typescript-eslint/no-unsafe-call': 'off',
  • '@typescript-eslint/no-unsafe-member-access': 'off',
  • '@typescript-eslint/no-unsafe-return': 'off',
  • '@typescript-eslint/no-floating-promises': 'off',
  • '@typescript-eslint/restrict-template-expressions': 'off',
  • '@typescript-eslint/no-base-to-string': 'off',
  • '@typescript-eslint/no-unsafe-assignment': 'off',
  • '@typescript-eslint/no-unsafe-argument': 'off',

@LightDDark
Copy link
Collaborator

LightDDark commented Feb 7, 2024

I've encountered a problem in utils.ts file, the original code:

export const test = baseTest.extend({
  context: async ({ context }, use) => {
    await context.addInitScript(() =>
      window.addEventListener('beforeunload', () =>
        (window as any).collectIstanbulCoverage(JSON.stringify((window as any).__coverage__)),
      ),
    )
    // more code
  },
})

Naturally after deleting '@typescript-eslint/no-unsafe-call': 'off' it'll cause a linting error,
However changing any to Window doesn't fix it (after adding the necessary attributes for it to work), nor defining a new interface inside the function.
It seems window becomes any regardless of anything, after some research I think it's related to the issue described over here .

@NoamGaash
Copy link
Member Author

@LightDDark that code piece is an anomaly - I think adding eslint-ignore-line is justified for this one

@yoavsbg
Copy link
Collaborator

yoavsbg commented Feb 25, 2024

Hi @NoamGaash
I can take this rules:
'@typescript-eslint/no-unsafe-return',
'@typescript-eslint/no-unsafe-argument'
can you please assign it to me?

@NoamGaash
Copy link
Member Author

sure, thanks!

yoavsbg added a commit to yoavsbg/open-bus-map-search that referenced this issue Mar 13, 2024
yoavsbg added a commit that referenced this issue Mar 13, 2024
@itsoriki itsoriki changed the title fix lint issues Fix lint issues May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci improvements to our CI pipeline frontend frontend developers issue good first issue Good for newcomers hacktoberfest low priority
Projects
None yet
Development

No branches or pull requests

3 participants