Overview Version History Q & A Rating & Review
SFDC Endpoint Linter - Cursor/VS Code Extension
A Cursor/VS Code extension that automatically detects .sfdc.cl endpoints in your code and warns you to use .sfdc.pl (Private Link) alternatives instead.
Features
🔍 Automatic Detection : Scans files for .sfdc.cl endpoints in real-time
⚠️ Inline Warnings : Shows warnings directly in the editor with squiggly underlines
💡 Quick Suggestions : Suggests .sfdc.pl alternatives
🎯 Smart Detection : Works with JSON, Terraform, YAML, Python, Go, and more
⚡ Auto-lint on Save : Automatically checks files when you save them
🔧 Configurable : Enable/disable via settings
Installation
Development Installation
Clone or navigate to the extension directory:
cd sfdc-endpoint-linter-extension
Install dependencies:
npm install
Compile the extension:
npm run compile
Open in VS Code/Cursor:
code .
Press F5 to launch a new window with the extension loaded
Package and Install
Install vsce (VS Code Extension Manager):
npm install -g @vscode/vsce
Package the extension:
vsce package
Install the .vsix file:
In Cursor/VS Code: Extensions → "..." menu → "Install from VSIX..."
Select the generated .vsix file
Usage
Once installed, the extension automatically:
Scans open files for .sfdc.cl endpoints
Shows warnings with yellow squiggly underlines
Displays hover messages explaining the issue
Suggests fixes in the Problems panel
Manual Linting
Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
Type: Lint .sfdc.cl Endpoints
Press Enter
Configuration
Open Settings (Cmd+, or Ctrl+,) and search for "SFDC Endpoint":
SFDC Endpoint Linter: Enabled - Enable/disable the linter (default: true)
SFDC Endpoint Linter: Show Inline Warnings - Show warnings in editor (default: true)
SFDC Endpoint Linter: Auto Lint On Save - Lint automatically on save (default: true)
Supported File Types
JSON (.json)
Terraform (.tf)
YAML (.yaml, .yml)
Python (.py)
Go (.go)
JavaScript (.js)
TypeScript (.ts)
Configuration files (.conf, .txt)
Example
When you have code like:
{
"endpoints": [
"api.example.sfdc.cl"
]
}
The extension will:
Underline api.example.sfdc.cl with a yellow squiggle
Show a warning: "⚠️ .sfdc.cl endpoint detected. Use 'api.example.sfdc.pl' instead..."
Display it in the Problems panel
Development
Build
npm run compile
Watch Mode
npm run watch
Test
Press F5 to launch extension development host
Open a file with .sfdc.cl endpoints
See warnings appear automatically
How It Works
Language Server : Uses VS Code's Diagnostic API
Pattern Matching : Regex to find .sfdc.cl patterns
Real-time Analysis : Analyzes files as you type (with debouncing)
Inline Diagnostics : Shows warnings directly in the editor
Troubleshooting
Warnings not showing?
Check extension is enabled in settings
Verify file type is supported
Reload window: Cmd+Shift+P → "Developer: Reload Window"
Too many warnings?
Adjust the exclusion patterns in src/linter.ts
Disable auto-lint on save in settings
License
MIT
Contributing
This is a hackathon project. Contributions welcome!