Permalink
Browse files

Merge pull request #439 from nvh/feature/linting

Feature/linting
  • Loading branch information...
nvh committed Nov 7, 2016
2 parents 8284723 + 1418695 commit ebdd729648203abd7ae33f026a256667cc1c00f3
Showing with 707 additions and 703 deletions.
  1. +12 −12 coffeelint.json
  2. +1 −1 framer/Align.coffee
  3. +2 −2 framer/Animation.coffee
  4. +1 −1 framer/Animator.coffee
  5. +3 −3 framer/Animators/BezierCurveAnimator.coffee
  6. +1 −1 framer/Canvas.coffee
  7. +193 −193 framer/Color.coffee
  8. +51 −51 framer/Components/DeviceComponent.coffee
  9. +4 −4 framer/Components/NavComponent.coffee
  10. +2 −2 framer/Components/NavComponentTransitions.coffee
  11. +9 −9 framer/Components/PageComponent.coffee
  12. +17 −16 framer/Components/ScrollComponent.coffee
  13. +1 −1 framer/Components/SliderComponent.coffee
  14. +4 −6 framer/Context.coffee
  15. +1 −0 framer/DOMEventManager.coffee
  16. +2 −2 framer/EventBuffer.coffee
  17. +5 −5 framer/Extras/ErrorDisplay.coffee
  18. +1 −1 framer/Extras/Hints.coffee
  19. +2 −1 framer/Extras/MobileScrollFix.coffee
  20. +1 −0 framer/Extras/ShareInfo.coffee
  21. +3 −3 framer/Extras/TouchEmulator.coffee
  22. +2 −2 framer/Framer.coffee
  23. +13 −13 framer/GestureInputRecognizer.coffee
  24. +2 −2 framer/Importer.coffee
  25. +56 −56 framer/Layer.coffee
  26. +1 −1 framer/LayerAnchor.coffee
  27. +18 −17 framer/LayerDraggable.coffee
  28. +1 −1 framer/LayerStateMachine.coffee
  29. +1 −1 framer/LayerStates.coffee
  30. +2 −2 framer/LayerStyle.coffee
  31. +1 −1 framer/Matrix.coffee
  32. +1 −1 framer/Print.coffee
  33. +3 −3 framer/SVGLayer.coffee
  34. +15 −15 framer/Screen.coffee
  35. +1 −1 framer/Simulation.coffee
  36. +2 −1 framer/Simulator.coffee
  37. +5 −5 framer/Simulators/MomentumBounceSimulator.coffee
  38. +1 −1 framer/Underscore.coffee
  39. +32 −32 framer/Utils.coffee
  40. +2 −2 gulpfile.coffee
  41. +2 −2 scripts/site.coffee
  42. +1 −1 test/tests.coffee
  43. +6 −6 test/tests/AlignTest.coffee
  44. +5 −5 test/tests/BaseClassTest.coffee
  45. +19 −19 test/tests/ContextTest.coffee
  46. +6 −6 test/tests/DeviceComponentTest.coffee
  47. +15 −15 test/tests/LayerAnimationTest.coffee
  48. +3 −3 test/tests/LayerDraggableTest.coffee
  49. +4 −4 test/tests/LayerStatesBackwardsTest.coffee
  50. +12 −12 test/tests/LayerStatesTest.coffee
  51. +89 −89 test/tests/LayerTest.coffee
  52. +22 −22 test/tests/ScrollComponentTest.coffee
  53. +47 −47 test/tests/UtilsTest.coffee
  54. +1 −1 test/tests/VideoLayerTest.coffee
View
@@ -1,9 +1,9 @@
{
"arrow_spacing": {
- "level": "ignore"
+ "level": "warn"
},
"braces_spacing": {
- "level": "ignore",
+ "level": "warn",
"spaces": 0,
"empty_object_spaces": 0
},
@@ -14,10 +14,10 @@
"level": "error"
},
"colon_assignment_spacing": {
- "level": "ignore",
+ "level": "warn",
"spacing": {
"left": 0,
- "right": 0
+ "right": 1
}
},
"cyclomatic_complexity": {
@@ -34,7 +34,7 @@
"level": "warn"
},
"eol_last": {
- "level": "ignore"
+ "level": "warn"
},
"indentation": {
"value": 1,
@@ -54,8 +54,8 @@
"is_strict": false
},
"newlines_after_classes": {
- "value": 3,
- "level": "ignore"
+ "value": 2,
+ "level": "warn"
},
"no_backticks": {
"level": "error"
@@ -68,7 +68,7 @@
"level": "ignore"
},
"no_empty_param_list": {
- "level": "ignore"
+ "level": "error"
},
"no_implicit_braces": {
"level": "ignore",
@@ -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"
View
@@ -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) ->
View
@@ -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)
@@ -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--
View
@@ -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))
@@ -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"]
View
@@ -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)
Oops, something went wrong.

0 comments on commit ebdd729

Please sign in to comment.