Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Granular for VSCodeNew to Visual Studio Code? Get it now.
Granular for VSCode

Granular for VSCode

zerobytes

| (0) | Free
Snippets and inline diagnostics for @granularjs/core projects.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Granular for VSCode

Snippets, inline lint diagnostics, and quick-create commands for @granularjs/core projects.

Diagnostics are powered by @granularjs/lint (or the umbrella @granularjs/cli). Install one of them in your project:

npm install --save-dev @granularjs/lint
# or
npm install --save-dev @granularjs/cli

Features

  • 11 snippets for common Granular patterns: gsig, gstate, gderive, gafter, gcompute, gwhen, glist, gboot, gform, gcls, gdev.
  • Inline diagnostics from granular-lint on save.
  • Granular: Create New App command (uses the local granular create / create-granular-app CLI).

Configuration

Setting Default Description
granular.lint.enable true Run the granular linter on save and report inline diagnostics.
granular.lint.cliPath "" Optional path to the linter CLI. Falls back to node_modules/.bin/granular-lint, then node_modules/.bin/granular.
granular.lint.runOn "save" When to run the linter (save or change).

Build

npm install
npm run compile           # tsc -p .
npx -y @vscode/vsce package   # produce a .vsix (no token needed)

Publish to the Marketplace

  1. Create a Personal Access Token in Azure DevOps with Marketplace → Manage scope.
  2. Copy .env.example to .env and set VSCE_PAT=... (.env is never committed).
  3. The publisher field in package.json is zerobytes — it must match your publisher on the Marketplace.
  4. From a clean git tree:
./release.sh patch   # or minor | major

The script runs npm ci, compiles, bumps the version with npm version, then runs vsce publish using the token from .env.

You can also export the token only for one session: export VSCE_PAT='...' and run ./release.sh patch without a .env file.

Develop

Open this folder in VSCode and press F5 to launch an Extension Development Host.

Lint output format

The extension parses lines of the form:

<file>:<line>:<col> [rule-name] message

This matches the JSON output of granular-lint --format=json <path> (or granular lint --format=json <path>).

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