Skip to content

Remove the stale rslint.json / rslint.jsonc entries from the lint config watcher #41

Description

@fi3ework

Problem

RSLINT_CONFIG_WATCH_NAMES in packages/vscode/src/stacks/lint/Rslint.ts:64-81 still lists rslint.json and rslint.jsonc, with a comment claiming "the Go server does load rslint.json from its cwd as a no-JS-config fallback in automatic mode".

That claim is stale. Current upstream automatic discovery only knows the four JS/TS module names and explicit loading rejects non-module extensions (rslint@origin/main:internal/config/discovery/catalog.go:18-37); the standalone extension has already removed the JSON names from its own watcher (packages/vscode-extension/src/Rslint.ts:45-56); and this extension's own detection deliberately ignores JSON (src/detection.ts:25-29, proven by e2e/lint/suite-noconfig/noconfig.test.ts:181-192).

Observable effect

  • Folder with only rslint.json: nothing happens, no runtime exists so no watcher is installed.
  • Folder that already has a lint runtime (native rslint.config.* or an Rstack bridge): touching rslint.json is classified as config-change, debounced 300 ms and sent as a config-refresh (Rslint.ts:124-130,516-520,582-620). Go rebuilds the current config transaction with loadMode: 'fresh', invalidates diagnostic and lint-project caches, re-evaluates the real JS/TS config and republishes every diagnostic (internal/lsp/config_discovery.go:323-437,820-848). No process restarts and the result is normally identical, so users are unlikely to notice, but it is a pointless full config re-evaluation triggered by a file that is never configuration.

Proposal

Remove rslint.json / rslint.jsonc from RSLINT_CONFIG_WATCH_NAMES and delete the comment. No behavior change for real configs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions