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

chore: Setup eslint for packages/nuqs #582

Closed
wants to merge 1 commit into from

Conversation

tylersayshi
Copy link
Contributor

Sharing the lint setup I created when debugging #566 in case linting is desired going forward.

This is mostly the default setup from npm init @eslint/config@latest with eslint 8, react, and ts. I added eslint-plugin-react-hooks & eslint-plugin-react-compiler.

I disabled the following rules because they throw errors in the current codebase that I didn't find particularly useful here:

rules: {
  '@typescript-eslint/no-explicit-any': 'off',
  '@typescript-eslint/ban-ts-comment': 'off',
  'no-useless-escape': 'off'
}

I also disabled eslint entirely in the *.test-d.ts files because those threw many errors with the rules of hooks and if the current usage of those files works fine for testing, I don't see any reason to lint there (at least for the rules of hooks).

Lastly, there are just a few warnings related to dependency arrays of the current hook usages:

image

These can be fixed very easily, but I will wait for feedback on how y'all would like to fix them (or not fix them) before making further changes.

Copy link

vercel bot commented Jun 27, 2024

Someone is attempting to deploy a commit to the 47ng Team on Vercel.

A member of the Team first needs to authorize it.

@tylersayshi
Copy link
Contributor Author

@franky47 should I close this? I'm guessing since it's been left here, you're likely not interested which is np for me, I just like to close things to keep my PR tabs clean if they're not going anywhere.

@franky47
Copy link
Member

franky47 commented Sep 25, 2024

Yeah I think we can close this. My experience with eslint has always been negative, though I see the value in a linter for community projects.

My eyes are on Biome to replace Prettier & linter steps, but last time I tried it it wasn't quite ready (especially regarding Tailwind support in the docs app).

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.

2 participants