Skip to content

Commit

Permalink
R2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dsheiko committed Mar 10, 2015
1 parent 82c0a6f commit 2658838
Show file tree
Hide file tree
Showing 12 changed files with 518 additions and 163 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,15 @@
# CHANGELOG

## R2.2.0
* New constrains of CompoundStatementConventions introduced
"allowOpeningBracePrecedingWhitespaces", "allowOpeningBraceTrailingWhitespaces",
"requireOpeningBracePrecedingNewLine", "requireOpeningBraceTrailingNewLine",
"allowClosingBracePrecedingWhitespaces", "requireClosingBracePrecedingNewLine"
See https://github.com/dsheiko/jscodesniffer/issues/17

## R2.1.15
* Support for .jscsignore. See https://github.com/dsheiko/jscodesniffer/issues/22
* Relax indentation rule(s) for JSDoc comments. See https://github.com/dsheiko/jscodesniffer/issues/21

## R2.1.14
* ArgumetSpacing sniff - config param `for` is optional. See https://github.com/dsheiko/jscodesniffer/issues/18
15 changes: 13 additions & 2 deletions README.md
Expand Up @@ -176,7 +176,8 @@ are tested by JSHint and therefore not provided with sniffs (See [http://contrib
"Indentation": {
"allowOnlyTabs": true,
"allowOnlySpaces": true,
"disallowMixed": true
"disallowMixed": true,
"ignoreBlockComments: true
},
/*
defines if trailing spaces allowed for lines
Expand Down Expand Up @@ -225,6 +226,10 @@ are tested by JSHint and therefore not provided with sniffs (See [http://contrib
// bad
if ( true ) var foo = "bar";
All the constrains are optional.
if ( true )__{..}, for (..)__{..} - opening brace preceding whitespace
if ( true ) {__..}, for (..){__..} - opening brace trailing whitespace
if ( true ) {..__}, for (..){..__} - closing brace preceding whitespace
*/
"CompoundStatementConventions": {
"for": [
Expand All @@ -238,7 +243,13 @@ are tested by JSHint and therefore not provided with sniffs (See [http://contrib
"TryStatement"
],
"requireBraces": true,
"requireMultipleLines": true
"requireMultipleLines": true,
"allowOpeningBracePrecedingWhitespaces": 1,
"allowOpeningBraceTrailingWhitespaces": 1,
"requireOpeningBracePrecedingNewLine": true,
"requireOpeningBraceTrailingNewLine": true,
"allowClosingBracePrecedingWhitespaces": 1,
"requireClosingBracePrecedingNewLine": true
},
/*
defines spacing conventions for unary expressions
Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "jscodesniffer",
"version": "2.1.15",
"version": "2.2.0",
"main": {
"jscs": "./jscs"
},
Expand Down
20 changes: 10 additions & 10 deletions lib/Dictionary/en.js
Expand Up @@ -138,19 +138,19 @@ define(function() {
"There must be [color:underline]{expected}[/color] whitespace(s) preceding" +
" argument list; [color:underline]{actual}[/color] found",

"CompoundStatementAllowOpeningBracePrecedingWhitespaces":
"There must be [color:underline]{expected}[/color] whitespace(s) preceding" +
"CompoundStatementAllowOpeningBracePrecedingWhitespaces":
"There must be [color:underline]{expected}[/color] whitespace(s) preceding" +
" opening brace; [color:underline]{actual}[/color] found",
"CompoundStatementAllowOpeningBraceTrailingWhitespaces":
"There must be [color:underline]{expected}[/color] whitespace(s) trailing" +
"CompoundStatementAllowOpeningBraceTrailingWhitespaces":
"There must be [color:underline]{expected}[/color] whitespace(s) trailing" +
" opening brace; [color:underline]{actual}[/color] found",

"CompoundStatementRequireOpeningBracePrecedingNewLine":
"Compound statements opening brace requires preceding new line",
"CompoundStatementRequireOpeningBraceTrailingNewLine":
"Compound statements opening brace requires trailing new line",
"CompoundStatementRequireClosingBracePrecedingNewLine":
"Compound statements closing brace requires preceding new line"
"CompoundStatementRequireOpeningBracePrecedingNewLine":
"Compound statements opening brace requires preceding new line",
"CompoundStatementRequireOpeningBraceTrailingNewLine":
"Compound statements opening brace requires trailing new line",
"CompoundStatementRequireClosingBracePrecedingNewLine":
"Compound statements closing brace requires preceding new line"

};
});
1 change: 1 addition & 0 deletions lib/Sniff/SourceCode/Indentation.js
Expand Up @@ -58,6 +58,7 @@ return function( sourceCode, mediator ) {
utils.validateRule( rule, "allowOnlyTabs", "boolean" );
utils.validateRule( rule, "allowOnlySpaces", "boolean" );
utils.validateRule( rule, "disallowMixed", "boolean" );
utils.validateRule( rule, "ignoreBlockComments", "boolean" );
},
/**
* Run the sniffer according a given rule if a given node type matches the case
Expand Down

0 comments on commit 2658838

Please sign in to comment.