Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
Add additional check in crockford preset
Browse files Browse the repository at this point in the history
Add check to disallow line breaks before blocks in crockford preset.
As verified on jslint.com this code does not pass validation:

var foo = 0;
if (foo > 0)
{
    foo = 0;
}

It fails with "Expected exactly one space between ')' and '{'.".

Closes gh-616
  • Loading branch information
vtintillier authored and markelog committed Sep 2, 2014
1 parent 11372cd commit 5c8cae5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion presets/crockford.json
Expand Up @@ -59,5 +59,6 @@
"requireLineFeedAtFileEnd": true,
"requireCapitalizedConstructors": true,
"requireDotNotation": true,
"disallowYodaConditions": true
"disallowYodaConditions": true,
"disallowNewlineBeforeBlockStatements": true
}

0 comments on commit 5c8cae5

Please sign in to comment.