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

New eslint fixes #1735

Merged
merged 17 commits into from
Apr 10, 2024
Merged

New eslint fixes #1735

merged 17 commits into from
Apr 10, 2024

Conversation

bdemann
Copy link
Member

@bdemann bdemann commented Apr 4, 2024

This adds fixes for 10 of the offending eslint rules reducing us down to only 7 tech-debt disabled rules.

Add 9 additional rules that were easy to fix and seem like they would be good.

  • func style (function should be declarations not declarations)
  • array-callback-return (map, filter, reduce, etc, should have returns (thus avoiding undefined[])
  • no-template-curly-in-string (to avoid accidentally doing "This is ${myValue}" instead of This is ${myValue}
  • eqeqeq (enforcing === instead of == and !== instead of !=)
  • prefer-template (use template literal instead of string concat)
  • no-param-reassign
  • @typescript-eslint/prefer-for-of
  • prefer-arrow-callback
  • no-var

Caution

Change the base of this PR to main before merging and merge #1734 first.

@bdemann bdemann changed the base branch from main to new_eslint April 4, 2024 19:53
@bdemann bdemann mentioned this pull request Apr 4, 2024
@bdemann bdemann changed the base branch from new_eslint to auto_fix_imports April 5, 2024 03:44
@bdemann bdemann force-pushed the new_eslint_fixes branch from c4d54b6 to 4998a9b Compare April 5, 2024 04:00
src/lib/canister_methods/execute_method.ts Outdated Show resolved Hide resolved
src/lib/globals.ts Outdated Show resolved Hide resolved
http_client/fetch_ic/actor.ts Outdated Show resolved Hide resolved
http_client/fetch_ic/actor.ts Outdated Show resolved Hide resolved
@bdemann bdemann changed the base branch from auto_fix_imports to main April 10, 2024 20:51
@lastmjs lastmjs changed the base branch from main to new_eslint April 10, 2024 20:59
@lastmjs lastmjs merged commit fa971dc into new_eslint Apr 10, 2024
119 of 121 checks passed
@bdemann bdemann deleted the new_eslint_fixes branch April 11, 2024 18:05
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.

3 participants