Skip to content

Commit aa9356f

Browse files
committed
chore: wip
1 parent 310911d commit aa9356f

File tree

4 files changed

+150
-249
lines changed

4 files changed

+150
-249
lines changed

packages/vscode/.vscodeignore

Lines changed: 11 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,14 @@
1-
# VS Code Extension Ignore File
2-
# Files and folders to exclude from the extension package
3-
4-
# Source files and development
5-
src/**
6-
test/**
7-
examples/**
8-
docs/**
9-
tsconfig.json
101
.vscode/**
11-
*.md
12-
!README.md
13-
14-
# Dependencies and build artifacts
15-
node_modules/
16-
*.log
17-
npm-debug.log*
18-
yarn-debug.log*
19-
yarn-error.log*
20-
21-
# OS generated files
22-
.DS_Store
23-
.DS_Store?
24-
._*
25-
.Spotlight-V100
26-
.Trashes
27-
ehthumbs.db
28-
Thumbs.db
29-
30-
# IDE files
31-
.vscode/
32-
.idea/
33-
*.swp
34-
*.swo
35-
*~
36-
37-
# Git
38-
.git/
2+
.vscode-test/**
3+
src/**
394
.gitignore
40-
41-
# TypeScript
42-
*.tsbuildinfo
43-
44-
# Coverage and testing
45-
coverage/
46-
.nyc_output/
47-
test-results/
48-
49-
# Temporary files
50-
tmp/
51-
temp/
52-
*.tmp
53-
*.temp
54-
55-
# Environment
56-
.env
57-
.env.local
58-
.env.*.local
59-
60-
# Package managers
61-
package-lock.json
62-
yarn.lock
5+
.yarnrc
6+
*.vsix
7+
**/*.ts
8+
**/*.map
9+
.eslintrc.json
10+
tsconfig.json
11+
node_modules/**
6312
bun.lockb
64-
pnpm-lock.yaml
65-
66-
# Build tools
67-
webpack.config.js
68-
rollup.config.js
69-
vite.config.js
70-
71-
# Linting and formatting
72-
.eslintrc*
73-
.prettierrc*
74-
.editorconfig
75-
76-
# Development scripts
77-
scripts/
78-
tools/
13+
build.ts
14+
.DS_Store

packages/vscode/README.md

Lines changed: 65 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -1,198 +1,102 @@
11
# Pickier VS Code Extension
22

3-
> Format, lint and more in a fraction of seconds.
3+
Fast, modern formatter and linter for TypeScript, JavaScript, JSON, HTML, CSS, Markdown, and YAML.
44

5-
[![Version](https://img.shields.io/vscode-marketplace/v/pickier.vscode.svg)](https://marketplace.visualstudio.com/items?itemName=pickier.vscode)
6-
[![Installs](https://img.shields.io/vscode-marketplace/i/pickier.vscode.svg)](https://marketplace.visualstudio.com/items?itemName=pickier.vscode)
7-
[![Rating](https://img.shields.io/vscode-marketplace/r/pickier.vscode.svg)](https://marketplace.visualstudio.com/items?itemName=pickier.vscode)
5+
## Features
86

9-
The official VS Code extension for [Pickier](https://github.com/stacksjs/pickier) - a lightning-fast formatter and linter built with Bun.
7+
- **Lightning Fast**: Built on Bun runtime for incredible performance
8+
- **Real-time Linting**: See errors and warnings as you type
9+
- **Auto-fix**: Automatically fix many issues with one command
10+
- **Multiple Languages**: TypeScript, JavaScript, JSON, HTML, CSS, Markdown, YAML
11+
- **Markdown Linting**: Comprehensive MD001-MD059 rule coverage
12+
- **Problems Integration**: All issues appear in VS Code's Problems panel
13+
- **Smart Underlines**: Visual indicators for errors (red) and warnings (yellow)
14+
- **Hover Tooltips**: Detailed error/warning information on hover
15+
- **Status Bar**: See issue count at a glance
1016

11-
## ✨ Features
17+
## Usage
1218

13-
- **🚀 Lightning Fast**: Built with Bun for maximum performance
14-
- **🎯 Multi-Language**: Supports TypeScript, JavaScript, JSON, HTML, CSS, Markdown, and YAML
15-
- **🔧 Smart Formatting**: Intelligent code formatting with configurable rules
16-
- **🔍 Advanced Linting**: Comprehensive linting with sorting and organization rules
17-
- **⚡ Real-time**: Instant feedback with live diagnostics
18-
- **🎨 Customizable**: Extensive configuration options for teams and individuals
19+
### Automatic Linting
1920

20-
## 🚀 Quick Start
21+
The extension automatically lints files when you:
22+
- Open a file
23+
- Save a file (configurable)
24+
- Type (with 500ms debounce, configurable)
2125

22-
1. **Install the extension** from the VS Code Marketplace
23-
2. **Open a supported file** (`.ts`, `.js`, `.json`, etc.)
24-
3. **Format on save** or use the command palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)
25-
4. **Customize settings** in VS Code preferences
26+
### Commands
2627

27-
## 📋 Supported File Types
28+
Access commands via Command Palette (Cmd/Ctrl+Shift+P):
2829

29-
| Language | Extensions | Formatting | Linting |
30-
|-------------|---------------------|------------|---------|
31-
| TypeScript | `.ts`, `.tsx` |||
32-
| JavaScript | `.js`, `.jsx` |||
33-
| JSON | `.json`, `.jsonc` |||
34-
| HTML | `.html` |||
35-
| CSS | `.css` |||
36-
| Markdown | `.md` |||
37-
| YAML | `.yaml`, `.yml` |||
38-
39-
## 🛠️ Commands
40-
41-
Access these via the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`):
42-
43-
- `Pickier: Format Document` - Format the entire document
44-
- `Pickier: Format Selection` - Format only selected text
45-
- `Pickier: Lint Document` - Lint the current document
30+
- `Pickier: Format Document` - Format the current file
31+
- `Pickier: Format Selection` - Format selected text
32+
- `Pickier: Lint Document` - Lint the current file
4633
- `Pickier: Lint Workspace` - Lint all files in workspace
34+
- `Pickier: Fix All Auto-fixable Issues` - Apply all available fixes
35+
- `Pickier: Organize Imports` - Sort and organize imports
36+
- `Pickier: Show Output Channel` - Show detailed output
37+
- `Pickier: Restart Extension` - Restart the extension
4738

48-
## ⚙️ Configuration
49-
50-
### Extension Settings
39+
### Configuration
5140

52-
| Setting | Default | Description |
53-
|---------|---------|-------------|
54-
| `pickier.enable` | `true` | Enable/disable Pickier |
55-
| `pickier.formatOnSave` | `false` | Format files on save |
56-
| `pickier.lintOnSave` | `true` | Lint files on save |
57-
| `pickier.configPath` | `""` | Path to config file |
58-
| `pickier.showOutputChannel` | `false` | Show debug output |
59-
60-
### Example VS Code Settings
41+
Configure Pickier in VS Code settings:
6142

6243
```json
6344
{
6445
"pickier.enable": true,
65-
"pickier.formatOnSave": true,
6646
"pickier.lintOnSave": true,
67-
"pickier.configPath": "pickier.config.ts",
68-
69-
"[typescript]": {
70-
"editor.defaultFormatter": "pickier.vscode"
71-
},
72-
"[javascript]": {
73-
"editor.defaultFormatter": "pickier.vscode"
74-
}
47+
"pickier.lintOnChange": true,
48+
"pickier.formatOnSave": false,
49+
"pickier.formatOnPaste": false,
50+
"pickier.statusBar.showIssueCount": true
7551
}
7652
```
7753

78-
### Pickier Configuration
54+
### Visual Indicators
55+
56+
- **Red Squiggles**: Errors that must be fixed
57+
- **Yellow Squiggles**: Warnings and style suggestions
58+
- **Faded Text**: Unused variables/imports
59+
- **Strikethrough**: Deprecated code
60+
61+
## Requirements
7962

80-
Create a `pickier.config.ts` in your workspace root:
63+
- VS Code 1.74.0 or higher
64+
- Pickier installed in your project (`bun add -d pickier`)
65+
66+
## Configuration File
67+
68+
Create a `pickier.config.ts` in your project root:
8169

8270
```typescript
8371
import type { PickierConfig } from 'pickier'
8472

85-
const config: PickierConfig = {
73+
export default {
74+
lint: {
75+
extensions: ['ts', 'js', 'md'],
76+
reporter: 'stylish'
77+
},
8678
format: {
8779
indent: 2,
8880
quotes: 'single',
89-
semi: false,
90-
trimTrailingWhitespace: true,
91-
},
92-
rules: {
93-
noDebugger: 'error',
94-
noConsole: 'warn',
95-
},
96-
pluginRules: {
97-
'sort-imports': 'warn',
98-
'sort-objects': 'warn',
99-
}
100-
}
101-
102-
export default config
103-
```
104-
105-
## 🔧 Integration
106-
107-
### Disable Conflicting Extensions
108-
109-
To avoid conflicts, disable other formatters for Pickier-supported files:
110-
111-
```json
112-
{
113-
"prettier.enable": false,
114-
"eslint.format.enable": false,
115-
"typescript.format.enable": false
116-
}
117-
```
118-
119-
### Working with ESLint
120-
121-
Pickier works great alongside ESLint. Use ESLint for logical rules and Pickier for formatting:
122-
123-
```json
124-
{
125-
"eslint.validate": ["typescript", "javascript"],
126-
"editor.codeActionsOnSave": {
127-
"source.fixAll.eslint": true
81+
semi: false
12882
}
129-
}
83+
} satisfies PickierConfig
13084
```
13185

132-
## 📊 Performance
133-
134-
Pickier is designed for speed:
135-
136-
- **Native Performance**: Built with Bun runtime
137-
- **Incremental Processing**: Only processes changed content
138-
- **Efficient Caching**: Smart caching for faster subsequent runs
139-
- **Minimal Overhead**: Lightweight VS Code integration
140-
141-
## 🐛 Troubleshooting
142-
143-
### Common Issues
144-
145-
**Extension not working?**
146-
147-
- Check that you're using supported file types
148-
- Verify extension is enabled in settings
149-
- Look for errors in the Output panel (View → Output → Pickier)
150-
151-
**Formatting conflicts?**
152-
153-
- Disable other formatters for the same file types
154-
- Check that Pickier is set as the default formatter
155-
156-
**Performance issues?**
157-
158-
- Enable caching in your Pickier config
159-
- Check ignore patterns to exclude unnecessary files
160-
161-
### Debug Mode
162-
163-
Enable detailed logging:
164-
165-
1. Set `pickier.showOutputChannel` to `true`
166-
2. Open View → Output → Pickier
167-
3. Perform actions to see debug information
168-
169-
## 📝 Examples
170-
171-
Check the [`examples/`](./examples/) folder for:
172-
173-
- Basic configuration setups
174-
- Advanced team configurations
175-
- VS Code settings examples
176-
- Integration patterns
177-
178-
## 🤝 Contributing
179-
180-
Found a bug or want to contribute? Check out our [GitHub repository](https://github.com/stacksjs/pickier).
181-
182-
### Development
86+
## Supported Languages
18387

184-
1. Clone the repository
185-
2. Run `bun install`
186-
3. Open in VS Code
187-
4. Press F5 to launch Extension Development Host
88+
- TypeScript (.ts, .tsx)
89+
- JavaScript (.js, .jsx)
90+
- JSON (.json, .jsonc)
91+
- HTML (.html)
92+
- CSS (.css)
93+
- Markdown (.md)
94+
- YAML (.yaml, .yml)
18895

189-
## 📄 License
96+
## Issues & Feedback
19097

191-
MIT License - see [LICENSE](../../LICENSE.md) for details.
98+
Report issues at: https://github.com/stacksjs/pickier/issues
19299

193-
## 🔗 Links
100+
## License
194101

195-
- [Pickier Documentation](https://github.com/stacksjs/pickier#readme)
196-
- [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=pickier.vscode)
197-
- [GitHub Repository](https://github.com/stacksjs/pickier)
198-
- [Issue Tracker](https://github.com/stacksjs/pickier/issues)
102+
MIT License - see LICENSE file for details

packages/vscode/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"publisher": "pickier",
3-
"name": "@pickier/vscode",
3+
"name": "pickier-vscode",
44
"displayName": "Pickier",
55
"type": "module",
66
"version": "0.1.7",
@@ -29,7 +29,7 @@
2929
],
3030
"main": "./dist/index.js",
3131
"engines": {
32-
"vscode": "^1.74.0"
32+
"vscode": "^1.103.0"
3333
},
3434
"activationEvents": [
3535
"onLanguage:typescript",
@@ -196,8 +196,8 @@
196196
"pretest": "bun run compile && bun run lint",
197197
"lint": "eslint src --ext ts",
198198
"test": "bun test",
199-
"package": "vsce package",
200-
"publish": "vsce publish"
199+
"package": "vsce package --no-dependencies",
200+
"publish": "vsce publish --no-dependencies"
201201
},
202202
"dependencies": {
203203
"pickier": "workspace:*"

0 commit comments

Comments
 (0)