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

feat(linter): add no-dupe-keys rule #188

Merged
merged 3 commits into from
Mar 15, 2023
Merged

feat(linter): add no-dupe-keys rule #188

merged 3 commits into from
Mar 15, 2023

Conversation

jason89521
Copy link
Contributor

Description

Add no-dupe-keys rule.

The test case : "var x = { 012: 1, 12: 2 };" would fail since the parser doesn't allow '0' prefixed octal literals.

thread 'rules::no_dupe_keys::test' panicked at 'expect test to pass: var x = { 012: 1, 12: 2 };
  × '0'-prefixed octal literals and octal escape sequences are deprecated
   ╭─[no_dupe_keys.tsx:1:1]
 1 │ var x = { 012: 1, 12: 2 };
   ·           ───
   ╰────
  help: for octal literals use the '0o' prefix instead
', crates/oxc_linter/src/tester.rs:39:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test rules::no_dupe_keys::test ... FAILED

Is it ok to delete the case?

Related issue

#123

@Boshen
Copy link
Member

Boshen commented Mar 15, 2023

Is it ok to delete the case?

comment it out and add a comment about it.

@jason89521 jason89521 mentioned this pull request Mar 15, 2023
54 tasks
@Boshen Boshen merged commit ed0c4b1 into main Mar 15, 2023
@Boshen Boshen deleted the linter/no-dupe-keys branch March 15, 2023 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants