Skip to main content

IDE Integration (VS Code)

This guide focuses on stable, low-noise integration with the VS Code ESLint extension.

Extension expectations​

Install and enable:

  • dbaeumer.vscode-eslint (official VS Code ESLint extension)

Recommended checks:

  • workspace is trusted,
  • project dependencies are installed,
  • VS Code uses the same Node version as your terminal/CI.

Flat Config sample​

// eslint.config.mjs
import immutable from "eslint-plugin-immutable-2";

export default [
{
files: ["**/*.{ts,tsx}"],
plugins: {
immutable,
},
rules: {
...immutable.configs.recommended.rules,
},
},
];

Type-aware parser setup notes​

immutable.configs.recommended already wires the parser, file globs, and base parser options, but it does not automatically enable projectService.

Enable typed parser services in the config block where you spread the preset when you want full semantic precision from rules such as immutable-data and readonly-array:

If you build a fully manual config block (instead of consuming a preset), configure parser services in the TypeScript-targeted config block:

languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
}

If parser services are missing, the plugin still loads, but checker-backed branches may skip or fall back conservatively.

Common gotchas​

  • File is outside tsconfig scope: typed rules may silently skip behavior.
  • Mismatched Node versions: CLI and VS Code show different diagnostics.
  • Stale extension process: reload the VS Code window after dependency upgrades.
  • Conflicting formatters/fixers: verify on-save actions are not undoing ESLint fixes.

Validation checklist​

  • npm run typecheck
  • npm run test
  • npm run lint:all:fix:quiet

If CLI is clean but VS Code is noisy, start with --print-config and extension output logs.