mirror of
https://github.com/gapmiss/substack-clipper.git
synced 2026-07-22 07:48:24 +00:00
2.1 KiB
2.1 KiB
Contributing
Thanks for your interest in contributing to Substack Clipper.
Development setup
git clone https://github.com/gapmiss/substack-clipper.git
cd substack-clipper
npm install
Build commands
| Command | Description |
|---|---|
npm run build |
Typecheck + production build |
npm run dev |
Watch mode (rebuilds on file change) |
npm run lint |
Run ESLint |
Testing in Obsidian
- Run
npm run devfor watch mode. - Symlink or copy
main.js,manifest.json, andstyles.cssto your test vault at.obsidian/plugins/substack-clipper/. - Enable the plugin in Obsidian settings.
- Use
Ctrl/Cmd + P> "Clip substack post" to test.
Code standards
- TypeScript strict mode with
noImplicitAnyandstrictNullChecks. - ESLint must pass with zero errors and zero warnings before submitting a PR. Run
npm run lintto check. - The project uses
eslint-plugin-obsidianmdandtypescript-eslint/recommendedTypeChecked. - Use
requestUrl()for all network requests, neverfetch(). - Use
normalizePath()for all vault paths. - No regex lookbehind (iOS compatibility).
- All UI text must use sentence case ("Clip substack post", not "Clip Substack Post").
- No
console.log— useconsole.warn,console.error, orconsole.debugonly. - Use
Array.from()when iteratingNodeListOf<>collections.
Pull requests
- Fork the repo and create a feature branch from
main. - Make your changes.
- Ensure
npm run buildandnpm run lintboth pass cleanly. - Test the change in Obsidian with at least one public Substack post.
- Open a PR with a clear description of what changed and why.
Reporting issues
Open an issue on GitHub with:
- The Substack URL that caused the problem (if applicable).
- What you expected to happen.
- What actually happened (error messages, screenshots, etc.).
- Your Obsidian version and OS.
License
By contributing, you agree that your contributions will be licensed under the MIT License.