quick-lint / quick-lint-js

quick-lint-js finds bugs in JavaScript programs
https://quick-lint-js.com
GNU General Public License v3.0
1.54k stars 192 forks source link

VS Code: confusing behavior for path-less file #588

Open strager opened 2 years ago

strager commented 2 years ago
  1. create quick-lint-js.config: {"globals": {"banana": true}}
  2. create a new file (Unnamed)
  3. change the file's language to JavaScript
  4. into the new file, write: banana;

expected: no warning for banana observed: warning for banana: undeclared variable

The problem is that the Unnamed file has no path, so quick-lint-js assumes that the file has no config. The default config causes an undeclared variable warning for banana.

strager commented 2 years ago

This issue might exist for other editors, too.

ni554n commented 7 months ago

Config fails to load on VSCode diff viewer too. 😞