Add requirement for space before function’s {

This commit is contained in:
kangax 2014-09-22 20:40:28 +02:00
parent 0c41880e97
commit 32e8463479
14 changed files with 17 additions and 15 deletions

View file

@ -13,7 +13,9 @@
"requireCapitalizedConstructors": true,
"requireDotNotation": true,
"requireMultipleVarDecl": true,
"requireSpacesInFunction": {
"beforeOpeningCurlyBrace": true
},
"disallowEmptyBlocks": true,
"disallowQuotedKeysInObjects": "allButReserved",

View file

@ -313,7 +313,7 @@
* @param {Number} t
* @return {Number}
*/
function hue2rgb(p, q, t){
function hue2rgb(p, q, t) {
if (t < 0) {
t += 1;
}

View file

@ -1,4 +1,4 @@
(function(global){
(function(global) {
'use strict';
var fabric = global.fabric;
@ -26,7 +26,7 @@
fabric.Image.filters.Blend = fabric.util.createClass({
type: 'Blend',
initialize: function(options){
initialize: function(options) {
options = options || {};
this.color = options.color || '#000';
this.image = options.image || false;

View file

@ -1,4 +1,4 @@
(function(){
(function() {
var cursorOffset = {
mt: 0, // n

View file

@ -1,4 +1,4 @@
(function(){
(function() {
var min = Math.min,
max = Math.max;

View file

@ -1,4 +1,4 @@
(function(){
(function() {
var degreesToRadians = fabric.util.degreesToRadians,
//jscs:disable requireCamelCaseOrUpperCaseIdentifiers

View file

@ -1,4 +1,4 @@
(function(){
(function() {
/**
* @private

View file

@ -56,7 +56,7 @@
}
/** @private */
function requestFs(path, callback){
function requestFs(path, callback) {
var fs = require('fs');
fs.readFile(path, function (err, data) {
if (err) {

View file

@ -1,4 +1,4 @@
(function(global){
(function(global) {
'use strict';

View file

@ -1,4 +1,4 @@
(function(global){
(function(global) {
'use strict';

View file

@ -321,7 +321,7 @@
* @private
* @see {@link http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-imagesmoothingenabled|WhatWG Canvas Standard}
*/
_setImageSmoothing: function(){
_setImageSmoothing: function() {
var ctx = this.getContext();
ctx.imageSmoothingEnabled = this.imageSmoothingEnabled;

View file

@ -1,4 +1,4 @@
(function(){
(function() {
function addParamToUrl(url, param) {
return url + (/\?/.test(url) ? '&' : '?') + param;

View file

@ -2,7 +2,7 @@
var slice = Array.prototype.slice, emptyFunction = function() { },
IS_DONTENUM_BUGGY = (function(){
IS_DONTENUM_BUGGY = (function() {
for (var p in { toString: 1 }) {
if (p === 'toString') {
return false;

View file

@ -1,4 +1,4 @@
(function(){
(function() {
/**
* Copies all enumerable properties of one object to another