Contributing Guide¶
Contributions are welcome! This guide will help you get started with development on the Kubeseal VSCode extension.
Development Setup¶
Prerequisites¶
- Node.js 20+
- npm
- VS Code 1.80.0+
- Git
Getting Started¶
-
Fork and clone the repository:
-
Install dependencies:
-
Compile the extension:
-
Open in VS Code:
-
Run the extension by pressing
F5to launch the Extension Development Host.
Development Commands¶
| Command | Description |
|---|---|
npm run compile | Compile TypeScript to JavaScript |
npm run watch | Watch mode for development |
npm test | Run tests |
npm run lint | Run ESLint |
npm run lint:fix | Auto-fix ESLint issues |
npm run format | Format code with Prettier |
npm run format:check | Check formatting without modifying |
npm run package | Package extension as VSIX |
npm run clean | Clean build artifacts |
Git Workflow¶
Never commit directly to main
Always use feature branches and create Pull Requests.
Branch Naming¶
Use conventional branch names:
feat/feature-name-- New featuresfix/bug-name-- Bug fixesdocs/description-- Documentation changesrefactor/description-- Code refactoring
Workflow¶
# Create a feature branch
git checkout -b feat/my-feature
# Make your changes and commit
git add .
git commit -m "feat: add my new feature"
# Push and create a PR
git push -u origin feat/my-feature
See Commit Conventions for commit message formatting.
Code Style¶
- TypeScript with strict mode enabled
- ESLint with
@typescript-eslint/recommendedrules - Prettier for code formatting
- Naming convention:
camelCasefor imports and variables - Use
===for equality checks - Use
unknowninstead ofanyfor type safety - Use
async/awaitwithpromises as fsfor file operations - Use
spawn()overexec()for shell commands (security)
Testing¶
Run the test suite:
When adding new features, include appropriate tests. The test runner is configured to compile TypeScript first and then execute the test suite.
Pull Request Guidelines¶
- Create a feature branch from
main - Make your changes with clear, conventional commit messages
- Ensure all tests pass (
npm test) - Ensure code passes linting (
npm run lint) - Ensure code is formatted (
npm run format:check) - Open a Pull Request with a clear description of changes
- Wait for CI checks to pass and request review
Reporting Issues¶
- Open an issue on GitHub
- Start a discussion in the Discussions tab