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: fix linting, formatting, and git hooks configs #291

Merged
merged 6 commits into from
Jan 26, 2024
Merged

chore: fix linting, formatting, and git hooks configs #291

merged 6 commits into from
Jan 26, 2024

Conversation

mcous
Copy link
Collaborator

@mcous mcous commented Jan 25, 2024

Overview

This PR fixes some code quality configs and hookups that we making it difficult to contribute effectively to this project.

Part of a two PR change set:

  1. chore: fix linting, formatting, and git hooks configs #291 <-- you are here
  2. chore: promote Prettier warnings to errors in CI and format all files #292

Change log

  • Incorporate eslint-plugin-svelte, @typescript-eslint/eslint-plugin, eslint-plugin-prettier into the ESLint config to:
    • Lint .svelte files
    • Lint .d.ts files
    • Avoid conflicts with prettier
  • Migrate the Husky config to v8
  • Fix up the lint-staged config now that Husky is actually working

(On a personal note, I'm not a huge fan of pre-commit hooks anymore. I find they interfere with people's personal work styles, and they're pretty unnecessary in a PR-squashing-based workflow. I'd be down to ditch the pre-commit stuff from the repo entirely)

.eslintrc.cjs Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
types/index.d.ts Outdated Show resolved Hide resolved
@yanick
Copy link
Collaborator

yanick commented Jan 26, 2024

On a personal note, I'm not a huge fan of pre-commit hooks anymore.

Ditto. I'll create an issue for potentially ditching husky (and I'll let it simmer a few days to see if anyone comes out of the woodwork to oppose the motion. :-)

@mcous
Copy link
Collaborator Author

mcous commented Jan 26, 2024

@yanick I've noticed PRs landing with merge commits, would you mind if we switched to squash merges? I find they're much easier for contributors (no need to keep an individual PR's history clean) and they tend to be more reliable with automatic versioning tools like semantic-release

If not, let me know and I can squash up the history here myself

@yanick
Copy link
Collaborator

yanick commented Jan 26, 2024

would you mind if we switched to squash merges?

In theory I prefer merge commits, but in reality I have to admit that the power of having a branch history is rarely used to have commits of the form "I did this..." "... and then that..." "and finally that" and much more "I did this..." "...and then prettier complained..." "... and I made a typo..." "... does it work now?", so yeah practically it's not that much of a good thing. :-)

So, sure, I'll go and switch the setting to squashing and let's try it.

@yanick yanick merged commit 16a7a4b into testing-library:main Jan 26, 2024
5 checks passed
Copy link

🎉 This PR is included in version 4.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mcous mcous deleted the improve-linting branch January 27, 2024 20:37
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.

2 participants