Skip to content
Permalink
Browse files

Extend linting rules

  • Loading branch information
nvh committed Nov 2, 2016
1 parent 14420bf commit 7c96f4ec8b46fdb38272fdc4269c29f51b5e0a40
@@ -1,10 +1,40 @@
{
"arrow_spacing": {
"level": "ignore"
},
"braces_spacing": {
"level": "ignore",
"spaces": 0,
"empty_object_spaces": 0
},
"camel_case_classes": {
"level": "error"
},
"coffeescript_error": {
"level": "error"
},
"colon_assignment_spacing": {
"level": "ignore",
"spacing": {
"left": 0,
"right": 0
}
},
"cyclomatic_complexity": {
"level": "ignore",
"value": 11
"value": 10
},
"duplicate_key": {
"level": "error"
},
"empty_constructor_needs_parens": {
"level": "ignore"
},
"ensure_comprehensions": {
"level": "warn"
},
"eol_last": {
"level": "ignore"
},
"indentation": {
"value": 1,
@@ -16,27 +46,90 @@
},
"max_line_length": {
"value": 80,
"level": "ignore",
"limitComments": true
},
"missing_fat_arrows": {
"level": "ignore",
"is_strict": false
},
"newlines_after_classes": {
"value": 3,
"level": "ignore"
},
"no_implicit_braces": {
"no_backticks": {
"level": "error"
},
"no_debugger": {
"level": "warn",
"console": false
},
"no_empty_functions": {
"level": "ignore"
},
"no_empty_param_list": {
"level": "ignore"
},
"no_implicit_braces": {
"level": "ignore",
"strict": true
},
"no_implicit_parens": {
"level": "ignore",
"strict": true
},
"no_interpolation_in_single_quotes": {
"level": "ignore"
},
"no_nested_string_interpolation": {
"level": "warn"
},
"no_plusplus": {
"level": "ignore"
},
"no_private_function_fat_arrows": {
"level": "warn"
},
"no_stand_alone_at": {
"level": "ignore"
},
"no_tabs": {
"level": "ignore"
},
"no_this": {
"level": "ignore"
},
"no_throwing_strings": {
"level": "error"
},
"no_trailing_semicolons": {
"level": "ignore"
"level": "error"
},
"no_trailing_whitespace": {
"level": "error",
"allowed_in_comments": false,
"allowed_in_empty_lines": true
},
"no_unnecessary_double_quotes": {
"level": "ignore"
},
"no_unnecessary_fat_arrows": {
"level": "warn"
},
"non_empty_constructor_needs_parens": {
"level": "ignore"
},
"prefer_english_operator": {
"level": "ignore",
"doubleNotLevel": "ignore"
},
"space_operators": {
"level": "ignore"
},
"spacing_after_comma": {
"level": "ignore"
},
"transform_messes_up_line_numbers": {
"level": "warn"
}
}
@@ -27,7 +27,7 @@ class exports.GridComponent extends Layer
value = {horizontal: value, vertical: value}
@_spacing = value
@_render()

@define "renderCell",
get: -> @_renderCell or @_defaultRenderCell
set: (f) ->
@@ -48,14 +48,14 @@ class exports.GridComponent extends Layer
@define "cells",
get: -> _.values(@_cells)

cellX: (row) ->
cellX: (row) ->
row * (@cellWidth + @spacing.horizontal)

cellY: (column) ->
column * (@cellHeight + @spacing.vertical)

cellFrame: (column, row) ->
frame =
frame =
x: @cellX(column)
y: @cellY(row)
width: @cellWidth
@@ -70,9 +70,9 @@ class exports.GridComponent extends Layer
# columns and rows

_render: ->

@_reset()

for row in [@rows-1..0]
for column in [@columns-1..0]

@@ -86,9 +86,9 @@ class exports.GridComponent extends Layer
parent: @
frame: frame
name: "Cell #{column}:#{row}"

@renderCell(cell, row, column)

@_cells["#{column}:#{row}"] = cell

_defaultRenderCell: (cell, column, row) ->
@@ -105,4 +105,3 @@ class exports.GridComponent extends Layer
# copy: ->
# result = super
# result.render()
@@ -260,7 +260,7 @@ class ShareComponent
style:
textAlign: "center"
color: "#00AAFF"
padding: 0;
padding: 0

# Render info section
_renderInfo: ->
@@ -175,7 +175,7 @@ class exports.SliderComponent extends Layer
@_hitArea
set: (value) ->
@_hitArea = value
if @width > @height
if @width > @height
@sliderOverlay.width = @width + @hitArea
@sliderOverlay.height = @hitArea
else
@@ -212,7 +212,7 @@ class exports.SliderComponent extends Layer
@value = @valueForPoint(@knob.midY)

_updateValue: =>

return if @_lastUpdatedValue is @value

@_lastUpdatedValue = @value
@@ -52,7 +52,7 @@ body {
# https://github.com/motif/company/issues/1642

# FramerCSSSafari = """
# @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
# @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
# .framerLayer {
# image-rendering: pixelated;
# }
@@ -50,7 +50,7 @@ class exports.EventBuffer extends BaseClass
return 0 if events.length < 2
p1 = events[0]
p2 = events[1]
return Math.atan2(p2.y - p1.y, p2.x - p1.x) * 180 / Math.PI;
return Math.atan2(p2.y - p1.y, p2.x - p1.x) * 180 / Math.PI

@define "velocity",
get: ->

0 comments on commit 7c96f4e

Please sign in to comment.
You can’t perform that action at this time.