Here’s an improved version of the README for your "code-guard" VS Code extension:
Code Guard - Your Code Quality Assistant
Code Guard is a VS Code extension that provides comprehensive code quality checks to help developers maintain high standards in their code. It ensures that the code adheres to best practices, follows coding style guidelines, and is free of bugs, security vulnerabilities, and performance bottlenecks.
Features
- Linting: Automatically checks your code for style guide violations and ensures consistency across your codebase.
- Bug Detection: Uses static analysis to identify potential bugs and common programming pitfalls.
- Code Formatting: Enforces consistent code formatting rules across the entire project.
- Best Practices: Ensures that your code follows established industry best practices.
- Security Checks: Detects basic security issues such as hardcoded credentials or vulnerable patterns.
- Performance Optimization: Highlights inefficient code patterns that may negatively affect performance.
Tip: You can configure the linting rules to match your team's style guide or coding preferences.
Requirements
- Node.js (version 12 or higher) is required to install and run this extension.
- ESLint: The extension leverages ESLint for linting. Ensure that you have an
eslint
configuration in your project (.eslintrc.json
or similar).
You can install ESLint by running:
npm install eslint --save-dev
Extension Settings
Code Guard adds the following settings:
codeGuard.enable
: Enable or disable the extension (default: true
).
codeGuard.autoFixOnSave
: Automatically fix linting errors on save (default: false
).
codeGuard.lintingRules
: Specify custom ESLint rules to override the default configuration.
Usage
- Install the extension from the VS Code marketplace.
- Open your project and run the
Code Guard: Lint Current File
command to lint the currently active file.
- Optionally, enable auto-fixing by setting
codeGuard.autoFixOnSave
to true
.
Known Issues
- Dynamic Imports Warning: Due to ESLint’s dynamic rule loading, some warnings might appear in the console. These do not affect functionality but may clutter logs.
- Large File Handling: Linting very large files may slow down performance.
Release Notes
1.0.0
- Initial release of Code Guard with core features: linting, bug detection, code formatting, and security/performance checks.
1.1.0
- Added auto-fix on save feature and performance improvements.
Contributing
We welcome contributions! Feel free to open issues, submit feature requests, or contribute directly by submitting a pull request.
Extension Guidelines
Make sure to follow the official VS Code Extension Guidelines to ensure compliance with best practices.
License
This extension is licensed under the MIT License.
Enjoy using Code Guard to improve your code quality!