Skip to content

Commit

Permalink
Merge pull request #439 from nvh/feature/linting
Browse files Browse the repository at this point in the history
Feature/linting
  • Loading branch information
nvh committed Nov 7, 2016
2 parents 8284723 + 1418695 commit ebdd729
Show file tree
Hide file tree
Showing 54 changed files with 707 additions and 703 deletions.
24 changes: 12 additions & 12 deletions coffeelint.json
@@ -1,9 +1,9 @@
{
"arrow_spacing": {
"level": "ignore"
"level": "warn"
},
"braces_spacing": {
"level": "ignore",
"level": "warn",
"spaces": 0,
"empty_object_spaces": 0
},
Expand All @@ -14,10 +14,10 @@
"level": "error"
},
"colon_assignment_spacing": {
"level": "ignore",
"level": "warn",
"spacing": {
"left": 0,
"right": 0
"right": 1
}
},
"cyclomatic_complexity": {
Expand All @@ -34,7 +34,7 @@
"level": "warn"
},
"eol_last": {
"level": "ignore"
"level": "warn"
},
"indentation": {
"value": 1,
Expand All @@ -54,8 +54,8 @@
"is_strict": false
},
"newlines_after_classes": {
"value": 3,
"level": "ignore"
"value": 2,
"level": "warn"
},
"no_backticks": {
"level": "error"
Expand All @@ -68,7 +68,7 @@
"level": "ignore"
},
"no_empty_param_list": {
"level": "ignore"
"level": "error"
},
"no_implicit_braces": {
"level": "ignore",
Expand Down Expand Up @@ -114,20 +114,20 @@
"level": "ignore"
},
"no_unnecessary_fat_arrows": {
"level": "warn"
"level": "error"
},
"non_empty_constructor_needs_parens": {
"level": "ignore"
},
"prefer_english_operator": {
"level": "ignore",
"doubleNotLevel": "ignore"
"level": "warn",
"doubleNotLevel": "warn"
},
"space_operators": {
"level": "ignore"
},
"spacing_after_comma": {
"level": "ignore"
"level": "error"
},
"transform_messes_up_line_numbers": {
"level": "warn"
Expand Down
2 changes: 1 addition & 1 deletion framer/Align.coffee
Expand Up @@ -13,7 +13,7 @@ center = (layer, property, offset=0) ->

return x if property is "x"
return y if property is "y"
return {x:x, y:y} if property is "point"
return {x: x, y: y} if property is "point"
return 0

left = (layer, property, offset=0) ->
Expand Down
4 changes: 2 additions & 2 deletions framer/Animation.coffee
Expand Up @@ -92,7 +92,7 @@ class exports.Animation extends BaseClass
get: -> @options.looping
set: (value) ->
@options?.looping = value
if @options?.looping and @layer? and !@isAnimating
if @options?.looping and @layer? and not @isAnimating
@restart()

@define "isNoop", @simpleProperty("isNoop", false)
Expand Down Expand Up @@ -161,7 +161,7 @@ class exports.Animation extends BaseClass
# Todo: more repeat behaviours:
# 1) add (from end position) 2) reverse (loop between a and b)
@once "end", =>
if @_repeatCounter > 0 || @looping
if @_repeatCounter > 0 or @looping
@restart()
if not @looping
@_repeatCounter--
Expand Down
2 changes: 1 addition & 1 deletion framer/Animator.coffee
Expand Up @@ -22,7 +22,7 @@ class exports.Animator
finished: ->
throw Error "Not implemented"

values: (delta=1/60, limit=100)->
values: (delta=1/60, limit=100) ->
values = []
for i in [0..limit]
values.push(@next(delta))
Expand Down
6 changes: 3 additions & 3 deletions framer/Animators/BezierCurveAnimator.coffee
Expand Up @@ -13,15 +13,15 @@ class exports.BezierCurveAnimator extends Animator

# Input is a one of the named bezier curves
if _.isString(options) and BezierCurveDefaults.hasOwnProperty options.toLowerCase()
options = { values: BezierCurveDefaults[options.toLowerCase()] }
options = {values: BezierCurveDefaults[options.toLowerCase()]}

# Input values is one of the named bezier curves
if options.values and _.isString(options.values) and BezierCurveDefaults.hasOwnProperty options.values.toLowerCase()
options = { values: BezierCurveDefaults[options.values.toLowerCase()], time: options.time }
options = {values: BezierCurveDefaults[options.values.toLowerCase()], time: options.time}

# Input is a single array of 4 values
if _.isArray(options) and options.length is 4
options = { values: options }
options = {values: options}

@options = _.defaults options,
values: BezierCurveDefaults["ease-in-out"]
Expand Down
2 changes: 1 addition & 1 deletion framer/Canvas.coffee
Expand Up @@ -20,7 +20,7 @@ class Canvas extends BaseClass
get: -> Framer.Device.background.image
set: (value) -> Framer.Device.background.image = value

constructor: (options={})->
constructor: (options={}) ->
super options
Events.wrap(window).addEventListener("resize", @_handleResize)

Expand Down

0 comments on commit ebdd729

Please sign in to comment.