https://github.com/msankhala/drupal-pre-committer
The drupal-pre-committer package that allows you to setup git pre-commit hooks in any Drupal project using husky npm package and provides the basic config/ignore files templates for different linters.
https://github.com/msankhala/drupal-pre-committer
drupal drupal-pre-commit git pre-commit
Last synced: 5 months ago
JSON representation
The drupal-pre-committer package that allows you to setup git pre-commit hooks in any Drupal project using husky npm package and provides the basic config/ignore files templates for different linters.
- Host: GitHub
- URL: https://github.com/msankhala/drupal-pre-committer
- Owner: msankhala
- Created: 2025-06-16T06:11:57.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-06-16T06:31:25.000Z (9 months ago)
- Last Synced: 2025-06-16T07:28:10.822Z (9 months ago)
- Topics: drupal, drupal-pre-commit, git, pre-commit
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @msankhala/drupal-pre-committer
## 🧩 Introduction
`@msankhala/drupal-pre-committer` is a meta-package designed to bootstrap Drupal projects with essential linting and formatting tools. It provides starter configurations and an interactive CLI to help you quickly set up a consistent code quality environment.
## 📦 Installation
You can use this package via `npx` without installing it.
### ⚙️ Usage
Run the CLI:
```bash
npx drupal-pre-committer config
```
Select the linting tools you want to install from the list:
1. Secretlint
1. ESLint
1. Stylelint
1. Prettier
1. Twig CS Fixer
1. PhpCodeSniffer
1. Twig CS Fixer
**The CLI will:**
1. Install the selected tools as dev dependencies.
1. Copy starter configuration files (e.g., .eslintrc.js, .stylelintrc.js, etc.) to your project root
## 🛠️ Supported Tools
1. Secretlint
1. ESLint
1. Stylelint
1. Prettier
1. Twig CS Fixer
1. PhpCodeSniffer
1. Twig CS Fixer
## 📁 Configuration Files
Each tool includes:
1. A default configuration file (e.g., .stylelintrc.js)
1. An ignore file (e.g., .stylelintignore)
These are copied to your project root when selected.
## 🤝 Contributing
Contributions are welcome! Feel free to open issues or submit pull requests to improve configurations or add support for more tools.