This document outlines the process for contributing, reporting issues, and submitting patches. By participating, you agree to abide by the project’s Code of Conduct.
- Reporting Bugs
- Suggesting Enhancements
- Development Setup
- Scripts
- Pull Request Workflow
- Code Style & Quality
- Commit Messages
- Code of Conduct
- License
To file a clear and actionable bug report:
- Search existing issues to see if the bug has already been reported.
- If not, open a new issue at https://github.com/addon-stack/inject-css/issues and include:
- A descriptive title.
- Steps to reproduce the problem.
- Expected vs. actual behavior.
- Environment details (OS, browser, Node.js/npm versions).
- Any relevant stack traces or screenshots.
For feature requests or enhancements:
- Check open issues for similar proposals.
- Open a new issue with:
- A clear use case or motivation.
- Proposed API or code examples (if available).
- Any alternatives you considered.
- Fork this repository.
- Clone your fork:
git clone git@github.com:<your-username>/inject-css.git cd inject-css
- Add the upstream remote (optional):
git remote add upstream git@github.com:addon-stack/inject-css.git
- Install dependencies (choose one):
npm install # or pnpm install # or yarn install
The following scripts are available and should be used during development:
npm run build— build the project with tsupnpm run build:watch— build in watch modenpm run format— format code with Biomenpm run format:check— check formatting onlynpm run lint— lint code with Biomenpm run lint:fix— attempt to automatically fix lint issuesnpm run lint:fix:aggressive— fix lint issues using unsafe rulesnpm run typecheck— run TypeScript type checksnpm run test— run tests with Jestnpm run test:ci— run tests in CI with coveragenpm run release— trigger release via release-it
Note: Husky hooks are configured. On commit, your message is validated with commitlint; on pre-commit, linting/formatting/tests are run.
- Create a feature branch:
git checkout -b feature/your-feature-name
- Make your changes in TypeScript under
src/. - Ensure local checks pass before opening a PR:
npm run format npm run lint npm run typecheck npm run build npm run test - Commit changes using Conventional Commits.
- Push to your fork and open a Pull Request against the
mainbranch. - Provide a clear title and description, referencing related issues (e.g.,
Closes #123).
- Language: TypeScript
- Formatting & Linting: Biome (see
biome.json)
Please run npm run format and npm run lint before submitting code. Type safety is enforced via npm run typecheck.
We follow the Conventional Commits specification. Commit messages are validated by commitlint.
Format:
<type>[optional scope]: <description>
Common types:
feat: a new featurefix: a bug fixdocs: documentation only changesstyle: formatting, missing semicolons, etcrefactor: code change that neither fixes a bug nor adds a featuretest: adding missing tests or correcting existing testschore: updating build tasks, package manager configs, etc
Example:
feat(core): add new API method for X
Please read and follow our Code of Conduct in all interactions.
By contributing, you agree that your changes will be licensed under the project’s MIT License.