Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>SFDC Endpoint LinterNew to Visual Studio Code? Get it now.
SFDC Endpoint Linter

SFDC Endpoint Linter

Harshit Pandey

| (0) | Free
Detects and warns about .sfdc.cl endpoints, suggesting .sfdc.pl alternatives
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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

  1. Clone or navigate to the extension directory:

    cd sfdc-endpoint-linter-extension
    
  2. Install dependencies:

    npm install
    
  3. Compile the extension:

    npm run compile
    
  4. Open in VS Code/Cursor:

    code .
    
  5. Press F5 to launch a new window with the extension loaded

Package and Install

  1. Install vsce (VS Code Extension Manager):

    npm install -g @vscode/vsce
    
  2. Package the extension:

    vsce package
    
  3. Install the .vsix file:

    • In Cursor/VS Code: Extensions → "..." menu → "Install from VSIX..."
    • Select the generated .vsix file

Usage

Once installed, the extension automatically:

  1. Scans open files for .sfdc.cl endpoints
  2. Shows warnings with yellow squiggly underlines
  3. Displays hover messages explaining the issue
  4. 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

  1. Press F5 to launch extension development host
  2. Open a file with .sfdc.cl endpoints
  3. See warnings appear automatically

How It Works

  1. Language Server: Uses VS Code's Diagnostic API
  2. Pattern Matching: Regex to find .sfdc.cl patterns
  3. Real-time Analysis: Analyzes files as you type (with debouncing)
  4. Inline Diagnostics: Shows warnings directly in the editor

Troubleshooting

Warnings not showing?

  1. Check extension is enabled in settings
  2. Verify file type is supported
  3. 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!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft