One-click setup for standardized linting and formatting in Go and TypeScript/NestJS projects at GoKwik.
Features
🚀 One-Click Setup
Run a single command to configure your entire project with:
For Go projects:
- golangci-lint with comprehensive linting rules
- gofumpt for stricter Go formatting
- goimports for import management
- SQL syntax validation (catches missing commas in SQL queries) ✨
- Secrets scanning with TruffleHog (prevents credential leaks) 🔐
- EditorConfig for consistent editor settings
- Makefile with linting commands
- VSCode settings optimized for Go development
For TypeScript/NestJS projects:
- ESLint with TypeScript support
- Prettier for code formatting
- SQL syntax validation (catches missing commas in SQL queries) ✨
- Secrets scanning with TruffleHog (prevents credential leaks) 🔐
- EditorConfig for consistent editor settings
- Husky pre-commit hooks (includes SQL validation & secrets scanning)
- VSCode settings optimized for development
📊 Status Bar Integration
See your project's linting status at a glance in the VS Code status bar.
🔍 SQL Syntax Validation
Automatically catches SQL syntax errors like missing commas in string literals:
// ❌ WRONG - Missing comma (caught by linter!)
const QUERY = `SELECT id as user_id "users"."name"`
// ✅ RIGHT
const QUERY = `SELECT id as user_id, "users"."name"`
Works in both Go and TypeScript/JavaScript files!
🔐 Secrets Scanning
Automatically detects secrets and credentials before they're committed:
// ❌ BLOCKED - API key detected!
const API_KEY = "sk_live_abc123def456ghi789";
// ✅ RIGHT - Use environment variables
const API_KEY = process.env.API_KEY;
Detects 700+ secret types including:
- API keys (AWS, GCP, Azure, Stripe, OpenAI, etc.)
- Database passwords
- Private keys (SSH, JWT, RSA, etc.)
- OAuth tokens
Blocks commits if secrets are found! Works for both Go and TypeScript.

⚡ Quick Actions
Access common linting tasks directly from the Command Palette:
- Format all files
- Lint and auto-fix issues
- Check configuration status
- Update configurations
🔄 Auto-Detection
Optionally prompt to setup linting when opening TypeScript projects without configuration.
Installation
From VS Code Marketplace
- Open VS Code
- Press
Ctrl+P / Cmd+P
- Type:
ext install gokwik.gokwik-linting-vscode
- Press Enter
From VSIX File
- Download the
.vsix file
- Open VS Code
- Go to Extensions view (
Ctrl+Shift+X / Cmd+Shift+X)
- Click
... menu → Install from VSIX...
- Select the downloaded file
Usage
Initial Setup
For TypeScript/NestJS projects:
- Open your TypeScript/NestJS project in VS Code
- Open Command Palette (
Ctrl+Shift+P / Cmd+Shift+P)
- Type:
GoKwik: Setup Linting & Formatting
- Press Enter and wait for completion
- Reload VS Code when prompted
That's it! Your project is now configured with standardized linting and formatting.
For Go projects:
- Open your Go project in VS Code
- Open Command Palette (
Ctrl+Shift+P / Cmd+Shift+P)
- Type:
GoKwik: Setup Linting & Formatting
- Press Enter - configuration files will be copied
- Install required Go tools:
# Install gofumpt + goimports
go install mvdan.cc/gofumpt@latest
go install golang.org/x/tools/cmd/goimports@latest
# Install golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.1
- Reload VS Code when prompted
Your Go project is now configured with standardized linting and formatting!
Available Commands
Open the Command Palette and search for "GoKwik" to see all available commands:
| Command |
Description |
GoKwik: Setup Linting & Formatting |
Complete setup for a new project (includes SQL validation) |
GoKwik: Update Configuration |
Update config files to latest version |
GoKwik: Format All Files |
Run Prettier on all files |
GoKwik: Lint & Fix Issues |
Run ESLint with auto-fix |
GoKwik: Check Linting Status |
Display current configuration status |
Manual SQL Validation
After setup, validate SQL syntax manually:
For Go projects:
make lint-sql
For TypeScript/NestJS projects:
npm run lint:sql
Manual Secrets Scanning
After setup, scan for secrets manually:
For Go projects:
make check-secrets
For TypeScript/NestJS projects:
npm run check:secrets
Note: TruffleHog is automatically installed during extension setup
Status Bar
The status bar shows your current linting status:
- ✓ GoKwik - Linting is properly configured
- ⚠ GoKwik Setup - Linting not configured (click to setup)
- No workspace - No workspace folder open
Click the status bar item to check detailed configuration status.
Configuration Files
For Go projects:
.golangci.yml - golangci-lint configuration with enabled linters
.editorconfig - Editor configuration (tabs, indent_size: 4)
.vscode/settings.json - VS Code settings for Go
scripts/lint-sql.sh - SQL syntax validator (universal script) ✨
scripts/check-secrets.sh - Secrets scanner using TruffleHog 🔐
Makefile - Build commands including make lint-sql and make check-secrets
For TypeScript/NestJS projects:
.prettierrc - Prettier formatting rules
.editorconfig - Editor configuration
.eslintrc.cjs - ESLint rules for TypeScript/NestJS
.node-version - Node.js version specification
.vscode/settings.json - VS Code workspace settings
scripts/lint-sql.sh - SQL syntax validator (universal script) ✨
scripts/check-secrets.sh - Secrets scanner using TruffleHog 🔐
Package.json Scripts (TypeScript/NestJS only)
Adds these npm scripts to your package.json:
{
"scripts": {
"prepare": "husky install",
"format": "prettier --write .",
"lint": "eslint 'src/**/*.{ts,js}' --max-warnings=0",
"lint:fix": "eslint 'src/**/*.{ts,js}' --fix",
"lint:sql": "bash scripts/lint-sql.sh",
"check:secrets": "bash scripts/check-secrets.sh",
"typecheck": "tsc -p tsconfig.json --noEmit",
"precommit": "lint-staged"
},
"lint-staged": {
"*.{ts,js,json,md}": ["prettier --write"],
"src/**/*.{ts,js}": ["eslint --fix"],
"*.{ts,js,go}": ["bash scripts/lint-sql.sh"],
"*": ["bash scripts/check-secrets.sh"]
}
}
Note: Pre-commit hooks will:
- Validate SQL syntax (
lint:sql) and block commits if errors found
- Scan for secrets (
check:secrets) and block commits if credentials detected
Dependencies (TypeScript/NestJS only)
Automatically installs these dev dependencies:
prettier - Code formatter
eslint - Linter
@typescript-eslint/parser - TypeScript parser
@typescript-eslint/eslint-plugin - TypeScript rules
eslint-config-prettier - Prettier integration
eslint-plugin-prettier - Prettier as ESLint rule
eslint-plugin-import - Import/export linting
eslint-plugin-unused-imports - Remove unused imports
husky - Git hooks
lint-staged - Lint staged files
VS Code Settings
For Go projects:
{
"go.formatTool": "gofumpt",
"go.lintTool": "golangci-lint",
"go.lintFlags": ["--fast"],
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"[go]": {
"editor.defaultFormatter": "golang.go"
}
}
For TypeScript/NestJS projects:
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
Configuration
Extension Settings
Configure the extension via VS Code settings:
| Setting |
Default |
Description |
gokwik.autoSetup |
false |
Auto-prompt for setup in unconfigured TypeScript projects |
gokwik.showStatusBar |
true |
Show linting status in status bar |
gokwik.autoInstallDependencies |
true |
Automatically install required dependencies |
To access settings:
- Open Settings (
Ctrl+, / Cmd+,)
- Search for "GoKwik"
Recommended VS Code Extensions
The extension works best with these installed:
For Go projects:
- Go (
golang.go) - Official Go extension by Go Team at Google
- EditorConfig for VS Code (
editorconfig.editorconfig)
For TypeScript/NestJS projects:
- Prettier - Code formatter (
esbenp.prettier-vscode)
- ESLint (
dbaeumer.vscode-eslint)
- EditorConfig for VS Code (
editorconfig.editorconfig)
The extension will automatically recommend these if not installed.
Workflow
Daily Development
For Go projects:
- Write code normally
- Files auto-format on save with gofumpt
- Imports auto-organize on save
- Run linting manually or in CI:
golangci-lint run
For TypeScript/NestJS projects:
- Write code normally
- Files auto-format on save (thanks to VS Code settings)
- ESLint auto-fixes issues on save
- No manual formatting needed!
Before Committing
For Go projects:
- Run
make lint-sql to check SQL syntax
- Run
make check-secrets to scan for secrets
- Run
golangci-lint run before committing
- Consider setting up pre-commit hooks using pre-commit framework
For TypeScript/NestJS projects:
Pre-commit hooks automatically:
- Format staged files with Prettier
- Fix ESLint issues in staged files
- Validate SQL syntax (blocks commit if errors found) ✨
- Scan for secrets (blocks commit if credentials detected) 🔐
- Block commit if unfixable errors exist
Running Manually
For Go projects:
# Validate SQL syntax
make lint-sql
# Check for secrets
make check-secrets
# Format all Go files
gofumpt -w .
# Organize imports
goimports -w .
# Run linter
golangci-lint run
# Run linter with auto-fix
golangci-lint run --fix
# Run all checks
make lint-all
# Run all pre-commit checks
make pre-commit
For TypeScript/NestJS projects:
# Validate SQL syntax
npm run lint:sql
# Check for secrets
npm run check:secrets
# Format all files
npm run format
# Lint with auto-fix
npm run lint:fix
# Lint without fixing (for CI)
npm run lint
# Type checking
npm run typecheck
Troubleshooting
Setup Fails
Problem: Setup command fails or hangs
Solutions:
- Ensure you have
package.json in your project root
- Check internet connection (downloads dependencies)
- Try running
npm install manually first
- Check the Output panel (View → Output → "GoKwik Linting")
Status Bar Not Showing
Problem: Status bar item doesn't appear
Solutions:
- Check setting:
gokwik.showStatusBar is true
- Ensure workspace folder is open
- Reload VS Code window
Problem: Files don't format when saved
Solutions:
- Install "Prettier - Code formatter" extension
- Check
.vscode/settings.json exists
- Verify
editor.formatOnSave is true
- Reload VS Code window
ESLint Not Auto-Fixing
Problem: ESLint doesn't fix on save
Solutions:
- Install "ESLint" extension
- Check
.eslintrc.cjs exists
- Verify ESLint extension is enabled
- Check Output panel for errors
Pre-commit Hooks Not Running
Problem: Hooks don't run on git commit
Solutions:
- Run
npm run prepare to install hooks
- Check
.husky/pre-commit exists
- Ensure Husky is installed:
npm ls husky
- Try
git commit from terminal (not VS Code)
Support
Getting Help
- Check the Troubleshooting section
- View logs in Output panel (View → Output → "GoKwik Linting")
- Create an issue on Bitbucket
Development
Building from Source
# Clone the repository
git clone https://bitbucket.org/gokwik/linting-typescript-vscode.git
cd linting-typescript-vscode
# Install dependencies
npm install
# Open in VS Code
code .
# Press F5 to run in debug mode
Testing
# Run linter
npm run lint
# Run tests
npm test
Packaging
# Create VSIX package
npm run package
# This creates gokwik-linting-vscode-1.0.0.vsix
Publishing
# Publish to VS Code Marketplace
npm run publish
Changelog
Version 1.0.0
- Initial release
- One-click setup command
- Status bar integration
- Auto-detection for TypeScript projects
- Format and lint commands
- Configuration update command
- Comprehensive error handling
License
MIT License - see LICENSE file for details.
Credits
Developed and maintained by the GoKwik development team.
Enjoy standardized linting and formatting! 🎉