PalisadoesFoundation / talawa-api

API Backend for the Talawa Mobile App. Click on the link below to see our documentation
https://docs.talawa.io/
GNU General Public License v3.0
222 stars 804 forks source link

Upgrade package typescript-eslint/eslint-plugin from 5.62.0 to 6.18.0 #1660

Closed palisadoes closed 9 months ago

palisadoes commented 10 months ago

Rationale

  1. This was previously attempted by the automated dependabot job but the PR tests failed.
  2. This issue has been created to fix the issue as there may be multiple dependency requirements that need updating

Task

Upgrade @typescript-eslint/eslint-plugin from 5.62.0 to 6.18.0.

Background Failing PRs

Release Note Details

Release notes

Sourced from @​typescript-eslint/eslint-plugin's releases.

v6.18.0

6.18.0 (2024-01-06)

🚀 Features

  • eslint-plugin: [no-var-requires, no-require-imports] allow option (#7710)
  • typescript-estree: throw on invalid update expressions (#7202)
  • typescript-estree: throw error when CatchClause param contains initializer (#8183)

❤️ Thank You

You can read about our versioning strategy and releases on our website.

v6.17.0

6.17.0 (2024-01-01)

Bug Fixes

  • eslint-plugin: [no-restricted-imports] prevent crash when patterns or paths in options are empty (#8108) (675e987)

Features

  • eslint-plugin: [no-floating-promises] flag result of .map(async) (#7897) (5857356)
  • eslint-plugin: [switch-exhaustiveness-check] add an option to warn against a default case on an already exhaustive switch (#7539) (6a219bd)

You can read about our versioning strategy and releases on our website.

v6.16.0

6.16.0 (2023-12-25)

Bug Fixes

  • eslint-plugin: [unbound-method] exempt all non-Promise built-in statics (#8096) (3182959)

Features

  • eslint-plugin: deprecate formatting rules (#8073) (04dea84)
  • typescript-estree: add allowDefaultProjectForFiles project service allowlist option (#7752) (7ddadda)

You can read about our versioning strategy and releases on our website.

... (truncated)

Changelog

Sourced from @​typescript-eslint/eslint-plugin's changelog.

6.18.0 (2024-01-06)

🚀 Features

  • typescript-estree: throw on invalid update expressions

  • eslint-plugin: [no-var-requires, no-require-imports] allow option

❤️ Thank You

  • auvred
  • Joshua Chen

You can read about our versioning strategy and releases on our website.

6.17.0 (2024-01-01)

Bug Fixes

  • eslint-plugin: [no-restricted-imports] prevent crash when patterns or paths in options are empty (#8108) (675e987)

Features

  • eslint-plugin: [no-floating-promises] flag result of .map(async) (#7897) (5857356)
  • eslint-plugin: [switch-exhaustiveness-check] add an option to warn against a default case on an already exhaustive switch (#7539) (6a219bd)

You can read about our versioning strategy and releases on our website.

6.16.0 (2023-12-25)

Bug Fixes

  • eslint-plugin: [unbound-method] exempt all non-Promise built-in statics (#8096) (3182959)

Features

  • eslint-plugin: deprecate formatting (meta.type: layout) rules (#8073) (04dea84)
  • eslint-plugin: deprecate no-extra-semi in favor of ESLint Stylistic equivalent (#8123) (9368bf3)

You can read about our versioning strategy and releases on our website.

... (truncated)

Commits
  • 21460ef chore(release): publish 6.18.0
  • d0977ab chore: use nx release (#8194)
  • 684d626 docs(eslint-plugin): [switch-exhaustiveness-check] remove extra quotes in rul...
  • f7b5ca8 feat(eslint-plugin): [no-var-requires, no-require-imports] allow option (#7710)
  • 1a8e0dc feat(typescript-estree): throw on invalid update expressions (#7202)
  • e566a5d chore: publish v6.17.0
  • 675e987 fix(eslint-plugin): [no-restricted-imports] prevent crash when patterns or ...
  • 5857356 feat(eslint-plugin): [no-floating-promises] flag result of .map(async) (#7897)
  • 6a219bd feat(eslint-plugin): [switch-exhaustiveness-check] add an option to warn agai...
  • 5ad1b76 docs: modify examples for explicit-module-boundary-types (#7404)
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sejal1411 commented 10 months ago

would like to contribute. pls assign!

Tarunmeena0901 commented 10 months ago

@noman2002 @palisadoes i would like to work on this

dhruvgupta0503 commented 10 months ago

Can I work on this issue.

Ayushhgupta39 commented 10 months ago

I want to work on this.

nakul30 commented 10 months ago

Can you assign this issue to me

Sejal1411 commented 10 months ago

@nakul30 you can look for other issues. I am already working on this issue.

Cioppolo14 commented 10 months ago

@nakul30 If the issue has already been assigned, please don't ask to be assigned. We want everyone to get a chance.

palisadoes commented 10 months ago

@Sejal1411

The automated dependabot process created a PR to upgrade to v6.18.1 that we had to close knowing that you were working on this. Please submit a PR soon. The current version will probably be deprecated soon.

Sejal1411 commented 10 months ago

yes @palisadoes! I will submit the PR in 1-2 days.

Sejal1411 commented 10 months ago

@palisadoes Unassigning because unable to reach a solution.

varshith257 commented 10 months ago

I would like to work on this issue.

NayOoLwin5 commented 10 months ago

I would like to work on this issue.

varshith257 commented 10 months ago

@palisadoes Would I proceed with upgrading @typescript-eslint/eslint-plugin from 5.62.0 to 6.18.0 ? They released eslint-plugin latest version -- 6.19.0 2 days back. In my opinion, if we proceed with 6.18.0 the Dependabot again will make conflicts regarding this. Need your suggestion

image

palisadoes commented 10 months ago

Upgrade to the latest version

varshith257 commented 10 months ago

@palisadoes Need your review and suggestion Upgraded the packages typescript-eslint/eslint-package to v16.9.0 and dependency peer requirements are also updated. But when running lint:check it causing new error. I tried in all ways from myside to resolve this issue through checking .eslintintric.json and tsconfig.json and they aren't found any solutions, even tried through upgrading to v16.8.0 but no results.

I have checked the paths and compatibility everything looks fine but leading to fail with this error:

image

Error cause --> .eslintric.json image

palisadoes commented 10 months ago
  1. The error says there is an unexpected parser being used though the only one we have is related to eslint.
  2. You may have to upgrade all the eslint packages together.
varshith257 commented 10 months ago

@palisadoes Have tried the same way , here's result: image

Have been referred their documentation in thought of compatibility issues and been checked with solving them but same error. https://main--typescript-eslint.netlify.app/users/dependency-versions

varshith257 commented 10 months ago

@palisadoes
I have rectified the root cause for this error. The updated package of eslint is working fine but as stated in override rules in. eslintric.json when .graphsql file occurs in linting process it has to override parser with eslint/graphsql-plugin-parser but in upgrading version it's not working.

varshith257 commented 10 months ago

@palisadoes The cause is to latest guidelines of eslint. In the src/typeDefs/directives.ts the error message says it occurred on a .graphql file. linting graphql files (or rather graphql fragments within TS files). Those do not have type information - hence they don't work.

In my opinion, I think we have to change override rules.

palisadoes commented 10 months ago

Is there a way to run a separate linter script just for that directory that the GraphQL linter uses? Possibly using a single command to run both scripts?

palisadoes commented 10 months ago
  1. Please investigate the best approach and open a PR.
  2. We want the linting functionality maintained
varshith257 commented 10 months ago

@palisadoes the possible error occurred due to no type which is part of validation of graphsql-parser in that typeDefs/directives.ts . Approach : We need to check files in src/typeDefs whether they required graphsql lint check necessary:

This error occurred because in override rules in .eslintric.json we included rules for directory /src/typeDefs to include graphsql-parser. The override rules have to change in eslintric.json

varshith257 commented 10 months ago

@palisadoes Would I proceed with above approach? Need your review.

palisadoes commented 10 months ago
  1. Please investigate the best approach and open a PR.

    1. We want the lighting functionality maintained

I just gave you my opinion on this

palisadoes commented 10 months ago

@varshith257

We have a policy of unassigning contributors who close PRs without getting validation from our reviewer team. This is because:

  1. We start looking for people to review PRs when you submit them.
  2. We often contact them and link to the PR. If the PR is closed the whole effort is wasted.
  3. The historical thread of reviewer comments is broken when the work is spread across multiple PRs. The quality of our code is affected negatively.

Please be considerate of our volunteers' limited time and our desire to improve our code base.

This policy is stated as a pinned post in all our Talawa repositories.

palisadoes commented 10 months ago
  1. Unassigning for the reasons above
  2. This is now available for someone else
varshith257 commented 10 months ago

@palisadoes The PR has been deleted due to errors stashed in my fork which have been deleted just now. So, the pull request has been deleted for that reason. Sorry, for the inconvenience caused. Can I get assigned this issue? Can make an immediate PR.