For example, a have an object:
let obj = { prop: test, prop: test1, };
And I want to get warning on a second "prop".
For example, a have an object:
let obj = { prop: test, prop: test1, };
And I want to get warning on a second "prop".
By default, VS Code's JavaScript support only checks the syntax code. You can opt into semantic checking as well by adding a // @ts-check comment to the top of your file:
TS check can catch many more errors than just duplicated keys. More info about ts-check
If you use ESLint and make sure the no-dupe-keys rule is enabled, it'll show a warning when you have code like that.
ESLint can be integrated into VSCode with this extension.