11<!--
22 CONTRIBUTING.md
3- Guidelines for contributing to the @adnbn /inject-css project.
3+ Guidelines for contributing to the @addon-core /inject-css project.
44-->
55
6- # Contributing to @adnbn /inject-css
6+ # Contributing to @addon-core /inject-css
77
88This document outlines the process for contributing, reporting issues, and submitting patches. By participating, you agree to abide by the project’s [ Code of Conduct] ( CODE_OF_CONDUCT.md ) .
99
@@ -12,11 +12,12 @@ This document outlines the process for contributing, reporting issues, and submi
12121 . [ Reporting Bugs] ( #reporting-bugs )
13132 . [ Suggesting Enhancements] ( #suggesting-enhancements )
14143 . [ Development Setup] ( #development-setup )
15- 4 . [ Submitting a Pull Request] ( #submitting-a-pull-request )
16- 5 . [ Code Style] ( #code-style )
17- 6 . [ Commit Messages] ( #commit-messages )
18- 7 . [ Code of Conduct] ( #code-of-conduct )
19- 8 . [ License] ( #license )
15+ 4 . [ Scripts] ( #scripts )
16+ 5 . [ Pull Request Workflow] ( #pull-request-workflow )
17+ 6 . [ Code Style & Quality] ( #code-style--quality )
18+ 7 . [ Commit Messages] ( #commit-messages )
19+ 8 . [ Code of Conduct] ( #code-of-conduct )
20+ 9 . [ License] ( #license )
2021
2122---
2223
@@ -25,7 +26,7 @@ This document outlines the process for contributing, reporting issues, and submi
2526To file a clear and actionable bug report:
2627
27281 . Search existing issues to see if the bug has already been reported.
28- 2 . If not, open a new issue and include:
29+ 2 . If not, open a new issue at https://github.com/addon-stack/inject-css/issues and include:
2930 - A descriptive title.
3031 - Steps to reproduce the problem.
3132 - Expected vs. actual behavior.
@@ -44,48 +45,74 @@ For feature requests or enhancements:
4445
4546## Development Setup
4647
47- 1 . Fork the repository:
48- ` git clone git@github.com:addonbone/inject-css.git `
49- 2 . Install dependencies:
50- ``` bash
51- cd inject-css
52- npm install
53- ```
54- 3. Available scripts:
55- - ` npm run format` — format code with Prettier
56- - ` npm run build` — build the project with tsup
57-
58- # # Submitting a Pull Request
59-
60- 1. Create a feature branch:
61- ` git checkout -b feature/name`
48+ 1 . Fork this repository.
49+ 2 . Clone your fork:
50+ ``` bash
51+ git clone git@github.com:< your-username> /inject-css.git
52+ cd inject-css
53+ ```
54+ 3 . Add the upstream remote (optional):
55+ ``` bash
56+ git remote add upstream git@github.com:addon-stack/inject-css.git
57+ ```
58+ 4 . Install dependencies (choose one):
59+ ``` bash
60+ npm install
61+ # or
62+ pnpm install
63+ # or
64+ yarn install
65+ ```
66+
67+ ## Scripts
68+
69+ The following scripts are available and should be used during development:
70+
71+ - ` npm run build ` — build the project with tsup
72+ - ` npm run build:watch ` — build in watch mode
73+ - ` npm run format ` — format code with Biome
74+ - ` npm run format:check ` — check formatting only
75+ - ` npm run lint ` — lint code with Biome
76+ - ` npm run lint:fix ` — attempt to automatically fix lint issues
77+ - ` npm run lint:fix:aggressive ` — fix lint issues using unsafe rules
78+ - ` npm run typecheck ` — run TypeScript type checks
79+ - ` npm run test ` — run tests with Jest
80+ - ` npm run test:ci ` — run tests in CI with coverage
81+ - ` npm run release ` — trigger release via release-it
82+
83+ Note: Husky hooks are configured. On commit, your message is validated with commitlint; on pre-commit, linting/formatting/tests are run.
84+
85+ ## Pull Request Workflow
86+
87+ 1 . Create a feature branch:
88+ ``` bash
89+ git checkout -b feature/your-feature-name
90+ ```
62912 . Make your changes in TypeScript under ` src/ ` .
63- 3. Ensure formatting passes:
64- ` ` ` bash
65- npm run format
66- ` ` `
67- 4. Run the build to confirm no errors:
68- ` ` ` bash
69- npm run build
70- ` ` `
71- 5. Commit changes using [Conventional Commits](https://www.conventionalcommits.org/):
72- ```
73- feat(core): add new API method for X
74- ```
75- 6. Push to your fork and open a Pull Request against the ` main` branch.
76- 7. Provide a clear title and description, referencing related issues (e.g., ` Closes # 123` ).
77-
78- # # Code Style
79-
80- - Language: ** TypeScript**
81- - Formatting: ** Prettier**
82-
83- Please run ` npm run format` before submitting code.
92+ 3 . Ensure local checks pass before opening a PR:
93+ ``` bash
94+ npm run format
95+ npm run lint
96+ npm run typecheck
97+ npm run build
98+ npm run test
99+ ```
100+ 4 . Commit changes using [ Conventional Commits] ( https://www.conventionalcommits.org/ ) .
101+ 5 . Push to your fork and open a Pull Request against the ` main ` branch.
102+ 6 . Provide a clear title and description, referencing related issues (e.g., ` Closes #123 ` ).
103+
104+ ## Code Style & Quality
105+
106+ - Language: TypeScript
107+ - Formatting & Linting: Biome (see ` biome.json ` )
108+
109+ Please run ` npm run format ` and ` npm run lint ` before submitting code. Type safety is enforced via ` npm run typecheck ` .
84110
85111## Commit Messages
86112
87- We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification:
113+ We follow the [ Conventional Commits] ( https://www.conventionalcommits.org/ ) specification. Commit messages are validated by commitlint.
88114
115+ Format:
89116```
90117<type>[optional scope]: <description>
91118```
@@ -100,10 +127,15 @@ Common types:
100127- ` test ` : adding missing tests or correcting existing tests
101128- ` chore ` : updating build tasks, package manager configs, etc
102129
130+ Example:
131+ ```
132+ feat(core): add new API method for X
133+ ```
134+
103135## Code of Conduct
104136
105137Please read and follow our [ Code of Conduct] ( CODE_OF_CONDUCT.md ) in all interactions.
106138
107139## License
108140
109- By contributing, you agree that your changes will be licensed under the project’s MIT License.
141+ By contributing, you agree that your changes will be licensed under the project’s [ MIT License] ( LICENSE.md ) .
0 commit comments