Skip to content

Commit

Permalink
Merge branch 'release/0.7.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Rechkunov committed Nov 11, 2015
2 parents 8906cf0 + 451cc27 commit 1b3dc56
Show file tree
Hide file tree
Showing 20 changed files with 180 additions and 141 deletions.
166 changes: 110 additions & 56 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,63 @@
{
"excludeFiles": [
"./**/node_modules/**", "./node_modules/**",
"./coverage/**",
"./public/**"
],
"disallowEmptyBlocks": true,
"disallowIdenticalDestructuringNames": true,
"disallowImplicitTypeConversion": ["numeric", "boolean", "binary", "string"],
"disallowKeywordsOnNewLine": ["else"],
"disallowKeywords": ["with", "void"],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowMultipleSpaces": true,
"disallowNestedTernaries": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowOperatorBeforeLineBreak": ["."],
"disallowPaddingNewlinesInBlocks": { "open": false, "close": true },
"disallowParenthesesAroundArrowParam": true,
"disallowQuotedKeysInObjects": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowSpaceBeforeComma": true,
"disallowSpaceBeforePostfixUnaryOperators": true,
"disallowSpaceBeforeSemicolon": true,
"disallowSpacesInCallExpression": true,
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInsideArrayBrackets": "all",
"disallowSpacesInsideBrackets": true,
"disallowSpacesInsideObjectBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowSpacesInsideParenthesizedExpression": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"disallowUnusedParams": true,
"disallowYodaConditions": true,
"jsDoc": {
"checkAnnotations": true,
"checkParamExistence": true,
"requireParamTypes": true,
"checkRedundantParams": true,
"checkReturnTypes": true,
"checkRedundantReturns": true,
"requireReturnTypes": true,
"checkTypes": "strictNativeCase",
"checkRedundantAccess": "enforceLeadingUnderscore",
"leadingUnderscoreAccess": true,
"disallowNewlineAfterDescription": true,
"requireParamDescription": true,
"requireReturnDescription": true
},
"maximumLineLength": 80,
"maximumNumberOfLines": 3000,
"maxErrors": 5,
"requireAlignedMultilineParams": "firstParam",
"requireBlocksOnNewline": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireCurlyBraces": [
"if",
"else",
Expand All @@ -13,64 +67,64 @@
"try",
"catch"
],

"requireSpaceBeforeBlockStatements": true,
"requireDollarBeforejQueryAssignment": true,
"requireDotNotation": true,
"requireLineBreakAfterVariableAssignment": true,
"requireObjectKeysOnNewLine": true,
"requireOperatorBeforeLineBreak": true,
"requirePaddingNewLinesAfterUseStrict": true,
"requirePaddingNewLinesBeforeExport": true,
"requirePaddingNewLinesInObjects": true,
"requireParenthesesAroundIIFE": true,
"requireSpacesInConditionalExpression": {
"afterTest": true,
"beforeConsequent": true,
"afterConsequent": true,
"beforeAlternate": true
},

"requireSemicolons": true,
"requireShorthandArrowFunctions": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpaceAfterComma": true,
"requireSpaceAfterKeywords": true,
"requireSpaceAfterLineComment": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceBeforeBlockStatements": 1,
"requireSpaceBeforeKeywords": [
"else",
"while",
"catch"
],
"requireSpaceBeforeObjectValues": true,
"requireSpaceBetweenArguments": true,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"requireSpacesInNamedFunctionExpression": {
"requireSpacesInConditionalExpression": true,
"requireSpacesInForStatement": true,
"requireSpacesInFunctionDeclaration": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},

"requireBlocksOnNewline": true,
"disallowEmptyBlocks": true,
"disallowSpacesInsideObjectBrackets": "all",
"disallowSpacesInsideArrayBrackets": "all",
"disallowSpacesInsideParentheses": true,
"disallowQuotedKeysInObjects": true,
"disallowSpaceAfterObjectKeys": true,
"requireSpaceBeforeObjectValues": true,
"requireCommaBeforeLineBreak": true,
"requireOperatorBeforeLineBreak": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowSpaceBeforePostfixUnaryOperators": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceAfterBinaryOperators": true,
"disallowImplicitTypeConversion": [
"numeric", "boolean", "binary", "string"
],
"requireCamelCaseOrUpperCaseIdentifiers": true,
"disallowKeywords": ["with", "let", "void"],
"disallowMultipleLineBreaks": true,
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"disallowTrailingComma": true,
"disallowKeywordsOnNewLine": ["else", "catch"],
"maximumLineLength": 80,
"requireCapitalizedConstructors": true,
"requireDotNotation": true,
"disallowYodaConditions": true,
"disallowNewlineBeforeBlockStatements": true,
"validateLineBreaks": "LF",
"validateQuoteMarks": "'",
"requireSpacesInFunction": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInGenerator": {
"beforeStar": true
},
"requireSpacesInNamedFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"safeContextKeyword": ["self"],
"validateAlignedFunctionParameters": true,
"validateIndentation": "\t",
"validateLineBreaks": "LF",
"validateParameterSeparator": ", ",
"validateJSDoc": {
"checkParamNames": true,
"checkRedundantParams": true,
"requireParamTypes": true
},
"safeContextKeyword": ["self"]
}
"validateQuoteMarks": "'",
"excludeFiles": [
"./**/node_modules/**",
"./coverage/**",
"./module_presets/**",
"./node_modules/**",
"./static/**",
"./public/**",
"./test/cases/**"
]
}
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: node_js
sudo: false
node_js:
- "0.10"
- "0.12"
- "1"
- "2"
- "3"
- "4"
- "5"
4 changes: 3 additions & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ var isRelease = process.argv.length === 3 ?
process.argv[2] === 'release' : undefined,
templateEngine = require('catberry-handlebars'),
catberry = require('catberry'),
cat = catberry.create({isRelease: isRelease});
cat = catberry.create({
isRelease: isRelease
});

templateEngine.register(cat.locator);
cat.build();
4 changes: 1 addition & 3 deletions catberry_components/document/Document.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ module.exports = Document;
* Creates new instance of "document" component.
* @constructor
*/
function Document() {

}
function Document() { }
4 changes: 1 addition & 3 deletions catberry_components/footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ module.exports = Footer;
* Creates new instance of the "footer" component.
* @constructor
*/
function Footer() {

}
function Footer() { }
4 changes: 1 addition & 3 deletions catberry_components/todo/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ module.exports = TodoApp;
* Creates new instance of the "todo-app" component.
* @constructor
*/
function TodoApp() {

}
function TodoApp() { }
4 changes: 1 addition & 3 deletions catberry_components/todo/clear-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ var todosHelper = require('../../../lib/helpers/todosHelper');
* Creates new instance of the "todo-clear-button" component.
* @constructor
*/
function TodoClearButton() {

}
function TodoClearButton() { }

/**
* Gets data context for template engine.
Expand Down
4 changes: 1 addition & 3 deletions catberry_components/todo/content/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ module.exports = TodoContent;
* Creates new instance of the "todo-content" component.
* @constructor
*/
function TodoContent() {

}
function TodoContent() { }

/**
* Gets data context for template engine.
Expand Down
4 changes: 1 addition & 3 deletions catberry_components/todo/count/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ var todosHelper = require('../../../lib/helpers/todosHelper');
* Creates new instance of the "todo-count" component.
* @constructor
*/
function TodoCount() {

}
function TodoCount() { }

/**
* Gets data context for template engine.
Expand Down
4 changes: 1 addition & 3 deletions catberry_components/todo/filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ module.exports = TodoFilters;
* Creates new instance of the "todo-filters" component.
* @constructor
*/
function TodoFilters() {

}
function TodoFilters() { }

/**
* Gets data context for template engine.
Expand Down
4 changes: 1 addition & 3 deletions catberry_components/todo/footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ module.exports = TodoFooter;
* Creates new instance of the "todo-footer" component.
* @constructor
*/
function TodoFooter() {

}
function TodoFooter() { }

/**
* Gets data context for template engine.
Expand Down
4 changes: 1 addition & 3 deletions catberry_components/todo/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ module.exports = TodoHeader;
* Creates new instance of the "todo-header" component.
* @constructor
*/
function TodoHeader() {

}
function TodoHeader() { }
8 changes: 3 additions & 5 deletions catberry_components/todo/input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ module.exports = TodoInput;
* Creates new instance of the "todo-input" component.
* @constructor
*/
function TodoInput() {

}
function TodoInput() { }

/**
* Input DOM element
Expand All @@ -38,7 +36,7 @@ TodoInput.prototype.bind = function () {

/**
* Handles submit form event.
* @param {Event} event
* @param {Event} event DOM event.
* @private
*/
TodoInput.prototype._handleAddTodo = function (event) {
Expand All @@ -54,7 +52,7 @@ TodoInput.prototype._handleAddTodo = function (event) {

/**
* Gets label of todo.
* @returns {string}
* @returns {string} Current value in input.
*/
TodoInput.prototype.getValue = function () {
return this.inputElement.value;
Expand Down
16 changes: 7 additions & 9 deletions catberry_components/todo/list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ var EDITING_CLASS_NAME = 'editing',
* Creates new instance of the "todo-list" component.
* @constructor
*/
function TodoList() {

}
function TodoList() { }

/**
* Gets data context for template engine.
Expand Down Expand Up @@ -59,7 +57,7 @@ TodoList.prototype.bind = function () {

/**
* Handles changed status of todo.
* @param {Event} event
* @param {Event} event DOM event.
* @private
*/
TodoList.prototype._handleMark = function (event) {
Expand All @@ -74,7 +72,7 @@ TodoList.prototype._handleMark = function (event) {

/**
* Handles edit of todo.
* @param {Event} event
* @param {Event} event DOM event.
* @private
*/
TodoList.prototype._handleEdit = function (event) {
Expand All @@ -93,7 +91,7 @@ TodoList.prototype._handleEdit = function (event) {

/**
* Handles start editing of todo.
* @param {Event} event
* @param {Event} event DOM event.
* @private
*/
TodoList.prototype._handleStartEditing = function (event) {
Expand All @@ -106,7 +104,7 @@ TodoList.prototype._handleStartEditing = function (event) {

/**
* Handles finish editing of todo.
* @param {Event} event
* @param {Event} event DOM event.
* @private
*/
TodoList.prototype._handleFinishEditing = function (event) {
Expand All @@ -118,7 +116,7 @@ TodoList.prototype._handleFinishEditing = function (event) {

/**
* Handles cancel editing of todo.
* @param {Event} event
* @param {Event} event DOM event.
* @private
*/
TodoList.prototype._handleCancelEditing = function (event) {
Expand All @@ -134,7 +132,7 @@ TodoList.prototype._handleCancelEditing = function (event) {

/**
* Handles deleting of todo.
* @param {Event} event
* @param {Event} event DOM event.
* @private
*/
TodoList.prototype._handleDelete = function (event) {
Expand Down
Loading

0 comments on commit 1b3dc56

Please sign in to comment.