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

Fix: Curly rule incorrectly flagging lexical declarations (fixes #11663) #11675

Merged
merged 2 commits into from May 11, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

Add invalid var single statement test case

  • Loading branch information...
BRKurek committed May 6, 2019
commit a216c623ae5a5e5deacef1c75e72d0438ba2bd0e
@@ -616,6 +616,18 @@ ruleTester.run("curly", rule, {
}
]
},
{
code: "if (foo) { \n var bar = 'baz'; \n }",
output: "if (foo) \n var bar = 'baz'; \n ",
options: ["multi-or-nest"],
errors: [
{
messageId: "unexpectedCurlyAfterCondition",
data: { name: "if" },
type: "IfStatement"
}
]
},
{
code: "while (true) { \n doSomething(); \n }",
output: "while (true) \n doSomething(); \n ",
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.