Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
231 changes: 231 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
{
"plugins": ["react"],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"es6": true,
"browser": true,
"node": true
},
"globals": {
"_": true,
"$": true,
"bowser": true,
"Bugsnag": true,
"c3": true,
"d3": true,
"DateTimeFormatMixin": true,
"dymo": true,
"CheckIns": true,
"CSRFMixin": true,
"Immutable": true,
"INTERFACES": true,
"Measure": true,
"MobileDetectionMixin": true,
"moment": true,
"Pusher": true,
"PUSHER_CHANNEL": true,
"PUSHER_DISABLED": true,
"PUSHER_KEY": true,
"qz": true,
"React": true,
"ReactDOM": true,
"ReactDOMServer": true,
"ReactMotion": true,
"Sha256": true,
"sweetAlert": true,
"Turbolinks": true
},
"extends": ["eslint:recommended", "plugin:react/recommended"],
"rules": {
"comma-dangle": [2, "always-multiline"],
"no-inner-declarations": 1,

"block-scoped-var": 1,
"complexity": [1, 15],
"consistent-return": 2,
"curly": 2,
"default-case": 1,
"dot-location": [2, "property"],
"dot-notation": 1,
"eqeqeq": [2, "smart"],
"guard-for-in": 2,
"no-caller": 2,
"no-case-declarations": 2,
"no-div-regex": 2,
"no-else-return": 0,
"no-empty-function": 1,
"no-eq-null": 2,
"no-eval": 1,
"no-extra-bind": 1,
"no-extra-label": 1,
"no-fallthrough": 1,
"no-floating-decimal": 2,
"no-implicit-coercion": 0,
"no-implied-eval": 2,
"no-invalid-this": 2,
"no-iterator": 2,
"no-labels": 2,
"no-lone-blocks": 1,
"no-magic-numbers": 0,
"no-multi-spaces": 1,
"no-multi-str": 1,
"no-native-reassign": 2,
"no-new": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-octal": 2,
"no-octal-escape": 2,
"no-param-reassign": [2, { "props": false }],
"no-proto": 2,
"no-redeclare": 1,
"no-return-assign": 0,
"no-script-url": 2,
"no-self-compare": 1,
"no-sequences": 1,
"no-throw-literal": 2,
"no-unmodified-loop-condition": 1,
"no-unused-expressions": [2, { "allowShortCircuit": true, "allowTernary": true }],
"no-useless-call": 2,
"no-useless-concat": 2,
"no-void": 1,
"no-warning-comments": 1,
"no-with": 2,
"radix": 1,
"vars-on-top": 0,
"wrap-iife": 2,
"yoda": [2, "never", { "onlyEquality": true }],

"no-shadow": 1,
"no-undefined": 2,

"array-bracket-spacing": [2, "never"],
"block-spacing": [2, "always"],
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"comma-spacing": [2, { "before": false, "after": true }],
"comma-style": [2, "last"],
"computed-property-spacing": [2, "never"],
"consistent-this": 0,
"func-names": 0,
"func-style": 0,
"indent": [2, 2, {"SwitchCase": 1}],
"jsx-quotes": [2, "prefer-double"],
"key-spacing": [2, { "beforeColon": false, "afterColon": true }],
"keyword-spacing": 2,
"max-depth": [1, 4],
"max-len": [1, 100, 2, { "ignoreUrls": true }],
"max-params": [1, 3],
"new-cap": 2,
"new-parens": 1,
"no-bitwise": 2,
"no-inline-comments": 1,
"no-lonely-if": 1,
"no-multiple-empty-lines": [2, { "max": 1 }],
"no-nested-ternary": 1,
"no-plusplus": 2,
"no-spaced-func": 2,
"no-trailing-spaces": 2,
"no-unneeded-ternary": 2,
"no-underscore-dangle": 0,
"no-whitespace-before-property": 2,
"object-curly-spacing": [2, "always"],
"padded-blocks": [2, "never"],
"quotes": [2, "double", "avoid-escape"],
"quote-props": 0,
"sort-vars": 1,
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, "always"],
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"spaced-comment": 2,
"wrap-regex": 1,

"arrow-parens": 2,
"arrow-spacing": [2, { "before": true, "after": true }],
"no-confusing-arrow": 2,
"no-var": 0,
"object-shorthand": [1, "methods"],
"prefer-arrow-callback": 0,
"prefer-const": 1,
"prefer-spread": 1,
"prefer-template": 1,
"template-curly-spacing": [2, "never"],

"react/display-name": 0,
"react/forbid-prop-types": 0,
"react/no-danger": 1,
"react/no-deprecated": [1, { "react": "0.14.6" }],
"react/no-did-mount-set-state": [2, "allow-in-func"],
"react/no-did-update-set-state": [2, "allow-in-func"],
"react/no-direct-mutation-state": 1,
"react/no-is-mounted": 1,
"react/no-multi-comp": 2,
"react/prefer-es6-class": [2, "never"],
"react/prop-types": 2,
"react/self-closing-comp": 1,
"react/sort-comp": [
1,
{
"order": [
"/^[^a-z]*$/",
"static-methods",
"lifecycle",
"/^get.+$/",
"/^is.+$/",
"/^has.+$/",
"/^can.+$/",
"render",
"/^render.+$/",
"/^handle.+$/",
"everything-else"
],
"groups": {
"lifecycle": [
"displayName",
"mixins",
"statics",
"propTypes",
"contextTypes",
"childContextTypes",
"defaultProps",
"constructor",
"getDefaultProps",
"getInitialState",
"state",
"getChildContext",
"componentWillMount",
"componentDidMount",
"componentWillReceiveProps",
"shouldComponentUpdate",
"componentWillUpdate",
"componentDidUpdate",
"componentWillUnmount"
]
}
}
],
"react/sort-prop-types": 1,
"react/wrap-multilines": 2,

"react/jsx-boolean-value": [1, "always"],
"react/jsx-closing-bracket-location": 2,
"react/jsx-equals-spacing": [2, "never"],
"react/jsx-handler-names": 1,
"react/jsx-indent-props": [2, 2],
"react/jsx-indent": [2, 2],
"react/jsx-key": 2,
"react/jsx-no-bind": 0,
"react/jsx-no-duplicate-props": 2,
"react/jsx-no-literals": 0,
"react/jsx-no-undef": 2,
"react/jsx-pascal-case": 2,
"react/jsx-sort-props": 0,
"react/jsx-space-before-closing": 2,
"react/jsx-uses-vars": 2
}
}
3 changes: 3 additions & 0 deletions .haml-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
linters:
RuboCop:
enabled: true
28 changes: 28 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
credo:
enabled: true

ruby:
config_file: .rubocop.yml

haml:
enabled: true
config_file: .haml-style.yml

markdown:
enabled: true

javascript:
enabled: false

eslint:
enabled: true
config_file: .eslintrc

scss:
enabled: false
config_file: .scss-lint.yml

python:
enabled: true

remark:
enabled: true
config_file: .remarkrc
5 changes: 5 additions & 0 deletions .remarkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": {
"lint-list-item-indent": true
}
}
7 changes: 5 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
Style/StringLiterals:
EnforcedStyle: single_quotes
AllCops:
TargetRubyVersion: 2.4.1

Style/MethodCallWithoutArgsParentheses:
Enabled: true
3 changes: 3 additions & 0 deletions .scss-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
linters:
Indentation:
width: 4
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ To run the app:
It will be accessible on port 9000

# Gotchas

The data (string) in ```stream_send``` method must end with two '\n' characters.
3 changes: 3 additions & 0 deletions TEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Hello
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect list-item indent: add 2 spaces


[World][]
14 changes: 14 additions & 0 deletions coffee_test.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class HelloWorld
constructor: ->
foo1(1,2)
foo2()
foo3()
foo4()
foo5()
foo6()
foo7()
foo8()
foo9(1,2)
foo10()
foo11()
foo12()
1 change: 1 addition & 0 deletions js_test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("foo")
23 changes: 23 additions & 0 deletions jsx_test.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from "react";
import Card from "./card";

export default class CardList extends React.Component {
constructor(props) {
super(props);
}

render () {
var card_list = this.props.deck_list.map(function(card) {
return (
<Card key={card.id} card={card} />
);
});

return (
<div className="card-list">
<h3>{this.props.name}</h3>
{card_list}
</div>
);
}
}
13 changes: 13 additions & 0 deletions ruby_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

# Test Hound
class TestHound
NAME = 'Wormbots'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

VERSION = '0.0.1'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

LOGISTICS = [NAME, VERSION].freeze

def foo
puts 'bar'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

puts "foo"
end
end
4 changes: 4 additions & 0 deletions scss_test.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.parent {
display: inline-block;
background: #fff;
}
6 changes: 6 additions & 0 deletions test.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
defmodule Test do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modules should have a @moduledoc tag.


def print(foo,bar) do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space missing after comma

IO.puts(foo, bar)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no trailing white-space at the end of a line.

end
end
4 changes: 4 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
x = 1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IndentationError: unexpected indent
unexpected indentation

if x == 1:
print("x is 1.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation is not a multiple of four


Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line at end of file

2 changes: 2 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /bin/sh
echo $1