From 1bfd6fc1ed971f945f9f37c79df1dc684cb548e8 Mon Sep 17 00:00:00 2001 From: Greg Lazarev Date: Mon, 1 Apr 2019 21:39:44 -0700 Subject: [PATCH] Test Hound --- .eslintrc | 231 +++++++++++++++++++++++++++++++++++++++++++++ .haml-style.yml | 3 + .hound.yml | 28 ++++++ .remarkrc | 5 + .rubocop.yml | 7 +- .scss-lint.yml | 3 + README.md | 1 + TEST.md | 3 + coffee_test.coffee | 14 +++ js_test.js | 1 + jsx_test.jsx | 23 +++++ ruby_test.rb | 13 +++ scss_test.scss | 4 + test.ex | 6 ++ test.py | 4 + test.sh | 2 + 16 files changed, 346 insertions(+), 2 deletions(-) create mode 100644 .eslintrc create mode 100644 .haml-style.yml create mode 100644 .remarkrc create mode 100644 .scss-lint.yml create mode 100644 TEST.md create mode 100644 coffee_test.coffee create mode 100644 js_test.js create mode 100644 jsx_test.jsx create mode 100644 ruby_test.rb create mode 100644 scss_test.scss create mode 100644 test.ex create mode 100644 test.py create mode 100755 test.sh diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..6b1dacd --- /dev/null +++ b/.eslintrc @@ -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 + } +} diff --git a/.haml-style.yml b/.haml-style.yml new file mode 100644 index 0000000..5eaed42 --- /dev/null +++ b/.haml-style.yml @@ -0,0 +1,3 @@ +linters: + RuboCop: + enabled: true diff --git a/.hound.yml b/.hound.yml index 5d0ff60..d66e170 100644 --- a/.hound.yml +++ b/.hound.yml @@ -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 diff --git a/.remarkrc b/.remarkrc new file mode 100644 index 0000000..8021db9 --- /dev/null +++ b/.remarkrc @@ -0,0 +1,5 @@ +{ + "plugins": { + "lint-list-item-indent": true + } +} diff --git a/.rubocop.yml b/.rubocop.yml index fa05aaa..c2f03f2 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,2 +1,5 @@ -Style/StringLiterals: - EnforcedStyle: single_quotes +AllCops: + TargetRubyVersion: 2.4.1 + +Style/MethodCallWithoutArgsParentheses: + Enabled: true diff --git a/.scss-lint.yml b/.scss-lint.yml new file mode 100644 index 0000000..ed5f3b4 --- /dev/null +++ b/.scss-lint.yml @@ -0,0 +1,3 @@ +linters: + Indentation: + width: 4 diff --git a/README.md b/README.md index 7c8471b..ad0c155 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/TEST.md b/TEST.md new file mode 100644 index 0000000..e87b2a5 --- /dev/null +++ b/TEST.md @@ -0,0 +1,3 @@ +* Hello + +[World][] diff --git a/coffee_test.coffee b/coffee_test.coffee new file mode 100644 index 0000000..d8050dc --- /dev/null +++ b/coffee_test.coffee @@ -0,0 +1,14 @@ +class HelloWorld + constructor: -> + foo1(1,2) + foo2() + foo3() + foo4() + foo5() + foo6() + foo7() + foo8() + foo9(1,2) + foo10() + foo11() + foo12() diff --git a/js_test.js b/js_test.js new file mode 100644 index 0000000..42288c9 --- /dev/null +++ b/js_test.js @@ -0,0 +1 @@ +console.log("foo") diff --git a/jsx_test.jsx b/jsx_test.jsx new file mode 100644 index 0000000..6cefa59 --- /dev/null +++ b/jsx_test.jsx @@ -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 ( + + ); + }); + + return ( +
+

{this.props.name}

+ {card_list} +
+ ); + } +} diff --git a/ruby_test.rb b/ruby_test.rb new file mode 100644 index 0000000..3f48673 --- /dev/null +++ b/ruby_test.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# Test Hound +class TestHound + NAME = 'Wormbots' + VERSION = '0.0.1' + LOGISTICS = [NAME, VERSION].freeze + + def foo + puts 'bar' + puts "foo" + end +end diff --git a/scss_test.scss b/scss_test.scss new file mode 100644 index 0000000..b205008 --- /dev/null +++ b/scss_test.scss @@ -0,0 +1,4 @@ +.parent { + display: inline-block; + background: #fff; +} diff --git a/test.ex b/test.ex new file mode 100644 index 0000000..ab9549a --- /dev/null +++ b/test.ex @@ -0,0 +1,6 @@ +defmodule Test do + + def print(foo,bar) do + IO.puts(foo, bar) + end +end diff --git a/test.py b/test.py new file mode 100644 index 0000000..9614de7 --- /dev/null +++ b/test.py @@ -0,0 +1,4 @@ + x = 1 +if x == 1: + print("x is 1.") + diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..7b1cb8f --- /dev/null +++ b/test.sh @@ -0,0 +1,2 @@ +#! /bin/sh +echo $1