Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Salsa duplicate literal properties cause should be flagged only when in strict mode #6650

Closed
egamma opened this issue Jan 27, 2016 · 4 comments
Labels
Duplicate An existing issue was already created

Comments

@egamma
Copy link
Member

egamma commented Jan 27, 2016

From @alexandrudima on January 27, 2016 13:53

Testing #2218

The duplicate here is not a problem because the code is not in strict mode (also tried running it and node runs it just fine):

// "use strict";
var o = { p: 1, p: 2};
console.log(o);

image

But in ES6 this is not an error anymore?

I have also found the following interesting note at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode:
image

Copied from original issue: microsoft/vscode#2452

@egamma egamma self-assigned this Jan 27, 2016
@egamma
Copy link
Member Author

egamma commented Jan 27, 2016

From @alexandrudima on January 27, 2016 13:55

The same is true regarding other flagged errors that should only be errors in strict mode:

image

@billti
Copy link
Member

billti commented Jan 27, 2016

It's not an error per the spec, but we flag this as almost a linter type check, as it is nearly always unintended.

Some of the other bugs logged are where you have asked for linter like checks where there is no error per the spec. Is this something you want us to suppress? Else this is 'by design'.

@alexdima
Copy link
Member

Works for me 👍

@mhegazy
Copy link
Contributor

mhegazy commented Feb 2, 2016

The error is already generated, but filtered out. as part of #6802, this should be enabled again.

@mhegazy mhegazy closed this as completed Feb 2, 2016
@mhegazy mhegazy added the Duplicate An existing issue was already created label Feb 2, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

5 participants