Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .ai-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"preferences": {
"emoticons": {
"type": "kaomoji",
"style": "backtick-emphasized",
"examples": [
"`(◕‿◕)`",
"`(⌐■_■)`",
"`(╯°□°)╯`",
"`ヽ(°〇°)ノ`",
"`(¬‿¬)`",
"`(◉◡◉)`",
"`ヽ(´▽`)/`",
"`(ノ◕ヮ◕)ノ*:・゚✧`"
]
},
"documentation": {
"tone": "friendly-professional",
"style": "developer-focused",
"emphasis": "backticks-for-kaomoji",
"structure": "logical-hierarchy"
},
"code": {
"style": "minimal-clean",
"comments": "concise-helpful",
"naming": "descriptive-clear"
}
},
"guidelines": {
"kaomoji_usage": [
"Use backticks around kaomojis for emphasis: `(◕‿◕)`",
"Match kaomoji emotion to content context",
"Prefer kaomojis over standard emojis",
"Use sparingly for maximum impact"
],
"documentation": [
"Start with clear value proposition",
"Use logical section ordering",
"Include practical examples",
"Maintain professional yet friendly tone"
]
}
}
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"es2022": true,
"node": true
},
"extends": ["eslint:recommended"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"no-console": "off",
"prefer-const": "error",
"no-var": "error"
}
}
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16, 18, 20, 22, 24]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run linter
run: npm run lint

- name: Run tests
run: npm test

- name: Test CLI functionality
run: |
node index.mjs --help
node index.mjs --init
node index.mjs --cleanup
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
*.log
157 changes: 157 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# Contributing to lcode

Thank you for your interest in contributing to lcode! This document provides guidelines and information for contributors.

## Development Setup

1. **Clone the repository**
```bash
git clone https://github.com/rkristelijn/lcode.git
cd lcode
```

2. **Install dependencies**
```bash
npm install
```

3. **Run tests**
```bash
npm test
```

4. **Run linter**
```bash
npm run lint
```

## Project Structure

```
lcode/
├── index.mjs # Main CLI entry point
├── src/
│ ├── utils.mjs # Utility functions
│ └── cache.mjs # Caching functionality
├── test/
│ ├── utils.test.mjs # Unit tests
│ ├── cache.test.mjs # Cache tests
│ └── integration.test.mjs # CLI integration tests
├── .github/workflows/ # CI/CD configuration
└── docs/ # Documentation
```

## Code Quality Standards

- **ES2022+ JavaScript** with ES modules
- **ESLint** for code linting
- **Node.js built-in test runner** for testing
- **100% test coverage** for new features
- **Semantic versioning** for releases

## Testing

We maintain comprehensive test coverage:

- **Unit tests**: Test individual functions in isolation
- **Integration tests**: Test CLI behavior end-to-end
- **Manual testing**: Verify real-world usage scenarios

Run tests with:
```bash
npm test # Run all tests
npm run test:watch # Watch mode for development
```

## Submitting Changes

1. **Fork the repository**
2. **Create a feature branch**
```bash
git checkout -b feature/your-feature-name
```

3. **Make your changes**
- Write tests for new functionality
- Update documentation if needed
- Follow existing code style

4. **Run quality checks**
```bash
npm test
npm run lint
```

5. **Commit your changes**
```bash
git commit -m "feat: add your feature description"
```

6. **Push and create a Pull Request**

## Commit Message Format

We follow conventional commits:
- `feat:` New features
- `fix:` Bug fixes
- `docs:` Documentation changes
- `test:` Test additions/changes
- `refactor:` Code refactoring
- `perf:` Performance improvements

## Feature Requests

Before implementing new features:
1. Check existing issues and discussions
2. Create an issue to discuss the feature
3. Wait for maintainer feedback
4. Implement with tests and documentation

## Bug Reports

When reporting bugs:
1. Use the issue template
2. Provide reproduction steps
3. Include system information
4. Add relevant error messages

## Code Style

- Use ESLint configuration provided
- Prefer `const` over `let`, avoid `var`
- Use descriptive variable names
- Add JSDoc comments for public functions
- Keep functions small and focused

## Performance Considerations

- Use async operations where possible
- Implement caching for expensive operations
- Avoid blocking the event loop
- Profile performance-critical code

## Documentation

- Update README.md for user-facing changes
- Add JSDoc comments for new functions
- Include examples in documentation
- Update help text for CLI changes

## Release Process

Releases are handled by maintainers:
1. Version bump following semver
2. Update CHANGELOG.md
3. Create GitHub release
4. Publish to npm

## Getting Help

- Check existing issues and discussions
- Ask questions in GitHub Discussions
- Join our community chat (if available)
- Contact maintainers directly for urgent issues

## License

By contributing, you agree that your contributions will be licensed under the same ISC license as the project.
15 changes: 15 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ISC License

Copyright (c) 2024, rkristelijn

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Loading