Skip to content

Conversation

@zoey-kaiser
Copy link
Member

@zoey-kaiser zoey-kaiser commented Aug 9, 2024

πŸ”— Linked issue

Closes N/A

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR:

  • Removed old non-flat eslint setup
  • Installed Antfu Eslint Config and sets up our usual development rules
  • Adds .vscode folder for extensions and settings
  • Installs OXLint
  • Fixes all issues that the new linters discovered

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

@zoey-kaiser zoey-kaiser marked this pull request as ready for review August 9, 2024 15:34

// At this point the request succeeded (i.e., it went through)
const error = new URL(data.url).searchParams.get('error')
// eslint-disable-next-line ts/no-use-before-define
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: For some issues I decided to disable the eslint rule for now. The biggest Issue that I did this for was when functions were used before they were defined.

This change would require making them all top-level functions (which I think is a good idea) but sadly we have some helpers (e.g. makeCWN: Make a call with Nuxt function) that makes this a bit more tricky. In addition to this, we also type a lot of functions with their params and returns, which was also tricky to continue using this, while making them top-level functions.

@phoenix-ru, feel free to fix these issues if you would like in this PR or a follow-up PR. However, I think its good to avoid big code changes here and only address minimal changes to avoid any breaking changes!

@zoey-kaiser
Copy link
Member Author

We also disabled all Nuxt Auto-imports. This was done a long time ago, I was wondering if we could maybe re-enable them, as this could reduce the amount of imports (+ incorrect typings) and also make the playgrounds act more like an actual Nuxt App would!

https://github.com/sidebase/nuxt-auth/blob/main/.nuxtrc#L1

@zoey-kaiser zoey-kaiser changed the title chore: Updated ESLint and general housekeeping chore: updated ESLint and general housekeeping Aug 22, 2024
@zoey-kaiser zoey-kaiser merged commit 324d0e2 into main Aug 22, 2024
@zoey-kaiser zoey-kaiser deleted the chore/update-eslint branch August 22, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants