Skip to content

chore: 🔧 add and configure lint-staged#4

Merged
andrewdyer merged 5 commits into
mainfrom
feat/lint-staged
Oct 28, 2025
Merged

chore: 🔧 add and configure lint-staged#4
andrewdyer merged 5 commits into
mainfrom
feat/lint-staged

Conversation

@andrewdyer
Copy link
Copy Markdown
Owner

This pull request updates the project's pre-commit workflow to use lint-staged in combination with Husky, ensuring that formatting and linting are only run on staged files. It also adds lint-staged as a dependency and updates the documentation to reflect these changes.

Pre-commit workflow improvements:

  • Updated the .husky/pre-commit script to use npx lint-staged, replacing the previous approach of running formatting, linting, type-checking, and tests on all files. This makes pre-commit checks faster and more targeted.
  • Added lint-staged as a dev dependency in package.json and configured it to run Prettier and ESLint only on staged files. [1] [2]

Documentation updates:

  • Updated the README.md to mention the use of both Husky and lint-staged for running linters and formatters on staged files before commits.

These changes streamline the development workflow by ensuring only relevant files are checked before commits, improving efficiency and developer experience.

This update includes the addition of lint-staged version 16.2.6 to both package.json and package-lock.json for improved code quality checks before commits.
This update introduces a lint-staged configuration to automate code formatting with Prettier and ESLint on staged files.
Updated the pre-commit hook to run lint-staged for improved code formatting and linting.
Clarified the usage of Husky and lint-staged for running linters and formatters on staged files before commits.
Clarified the usage of Husky and lint-staged for running linters and formatters on staged files before commits.
@andrewdyer andrewdyer merged commit 198756c into main Oct 28, 2025
3 checks passed
@andrewdyer andrewdyer deleted the feat/lint-staged branch October 28, 2025 21:50
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.

1 participant