Skip to content

Commit

Permalink
Merge pull request #29 from renderforest/remove-vulnerable-deps
Browse files Browse the repository at this point in the history
remove vulnerable deps
  • Loading branch information
AlbertHambardzumyan authored May 3, 2018
2 parents 3156370 + ae3103c commit a20b8c2
Show file tree
Hide file tree
Showing 17 changed files with 6,890 additions and 352 deletions.
5 changes: 0 additions & 5 deletions .babelrc

This file was deleted.

93 changes: 29 additions & 64 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
{
"extends": [
"standard",
"plugin:flowtype/recommended"
"standard"
],
"globals": {
"expect": false,
"test": false,
"describe": false,
"jest": false,
"afterAll": false
"afterAll": false,
"beforeAll": false
},
"plugins": [
"flowtype"
],
"rules": {
"curly": 0,
"comma-dangle": [
2,
"never"
Expand All @@ -26,80 +22,49 @@
"after": true
}
],
"no-sequences": 0,
"consistent-return": 0,
"camelcase": 0,
"no-proto": 0,
"no-throw-literal": 0,
"no-useless-escape": 0,
"curly": 2,
"eqeqeq": [
2,
"allow-null"
],
"key-spacing": 0,
"no-underscore-dangle": 0,
"no-unused-expressions": 0,
"space-before-function-paren": 2,
"global-require": 2,
"handle-callback-err": 2,
"indent": [
2,
2
],
"key-spacing": 2,
"new-cap": 2,
"no-cond-assign": 2,
"no-extend-native": 2,
"no-mixed-requires": 2,
"no-new-require": 2,
"no-proto": 2,
"no-sequences": 2,
"no-shadow": 0,
"no-shadow-restricted-names": 0,
"no-shadow-restricted-names": 2,
"no-throw-literal": 2,
"no-underscore-dangle": 0,
"no-unused-expressions": 2,
"no-use-before-define": [
"error",
{
"functions": true,
"classes": true
}
],
"no-extend-native": 0,
"no-var": 2,
"new-cap": 0,
"quotes": 2,
"semi-spacing": 0,
"space-unary-ops": 0,
"space-infix-ops": 0,
"consistent-return": 0,
"object-curly-spacing": [
"error",
"always"
],
"strict": 0,
"flowtype/boolean-style": [
2,
"boolean"
],
"flowtype/define-flow-type": 1,
"flowtype/delimiter-dangle": [
2,
"never"
],
"flowtype/generic-spacing": [
2,
"never"
],
"flowtype/no-primitive-constructor-types": 2,
"flowtype/no-types-missing-file-annotation": 2,
"flowtype/no-weak-types": 0,
"flowtype/object-type-delimiter": [
2,
"comma"
],
"flowtype/require-parameter-type": 0,
"flowtype/require-valid-file-annotation": 2,
"flowtype/space-after-type-colon": [
2,
"always"
],
"flowtype/space-before-generic-bracket": [
2,
"never"
],
"flowtype/space-before-type-colon": [
2,
"never"
],
"flowtype/union-intersection-spacing": [
2,
"always"
],
"flowtype/use-flow-type": 1,
"flowtype/valid-syntax": 1
"quotes": 2,
"semi-spacing": 2,
"space-before-function-paren": 2,
"space-infix-ops": 2,
"space-unary-ops": 2,
"strict": 2
}
}
16 changes: 0 additions & 16 deletions .flowconfig

This file was deleted.

17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
Thank you for reporting an issue.
Please fill in as much of the template below as you're able.
If possible, please provide additional details that demonstrate the problem, keeping it as
simple and free of external dependencies as you are able.
-->

* **Expected Behavior**:
* **Actual Behavior**:
* **Steps to reproduce the behavior**:

<!-- Enter your issue details below this comment. -->

* **Issue additional details**:
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
language: node_js
sudo: false
node_js:
- "6.9.1"
- "8.8.1"
- "6.13.1"
- "8.9.3"
cache:
directories:
- node_modules
install:
- npm install
script:
- npm run lint-no-fix
- npm test
72 changes: 6 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,11 @@
# notification-hooks
Notification Hooks 🚨
Notification Hooks.

[![Build Status](https://travis-ci.org/renderforest/notification-hooks.svg?branch=master)](https://travis-ci.org/renderforest/notification-hooks)
[![GitHub issues](https://img.shields.io/github/issues/renderforest/notification-hooks.svg)](https://github.com/renderforest/notification-hooks/issues)
[![GitHub release](https://img.shields.io/github/release/renderforest/notification-hooks.svg)](https://github.com/renderforest/notification-hooks/releases)
[![GitHub stars](https://img.shields.io/github/stars/renderforest/notification-hooks.svg)](https://github.com/renderforest/notification-hooks/stargazers)

[![Dep](https://img.shields.io/david/renderforest/notification-hooks.svg)](https://david-dm.org/renderforest/notification-hooks)
[![DevDep](https://img.shields.io/david/dev/renderforest/notification-hooks.svg)](https://david-dm.org/renderforest/notification-hooks?type=dev)


# API ✍

Environment variables(s):

* SLACK_WEB_HOOK_URL


## Slack API

#### notifyError(...)
``` javascript
const SlackHooks = require('notification-hooks').Slack

const options = {
channel: '#media-upload',
codeSnippet: false, // default value is `true`
iconEmoji: ':lion_face:', // default value is ':fire:'
text: 'Hello world!', // supports string, Object, Error
username: '@albert @ryan'
}

SlackHooks.notifyError(options).then().catch()
```

#### notifyWarn(...)
``` javascript
const SlackHooks = require('notification-hooks').Slack
const options = {
channel: '#backend',
codeSnippet: false, // default value is `true`
iconEmoji: ':bus:', // default value is ':warning:'
text: 'Hi there!', // supports both string & Object
username: '@cris @ryan'
}
SlackHooks.notifyWarn(options).then().catch()
```

#### notifyInfo(...)
``` javascript
const SlackHooks = require('notification-hooks').Slack
const options = {
channel: '#front',
codeSnippet: true, // default value is `true`
iconEmoji: ':airplane:', // default value is ':information_source:'
text: 'Hello!', // supports both string & Object
username: '@john'
}
SlackHooks.notifyError(options).then().catch()
```

# Development ⚠
In case you add new third party dependencies, use flow-typed npm package to add annotations for that packages.
* npm i -g flow-typed
* flow-typed install --ignoreDeps dev

Table of Contents

* [API](https://github.com/renderforest/notification-hooks/blob/master/doc/API.md)
* [Contributing](https://github.com/renderforest/notification-hooks/blob/master/CONTRIBUTING.md)
* [Test](https://github.com/renderforest/notification-hooks/blob/master/doc/TEST.md)
2 changes: 0 additions & 2 deletions __mocks__/request-promise.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
'use strict'

module.exports = (params) => Promise.resolve(params)
8 changes: 0 additions & 8 deletions dist/index.js

This file was deleted.

Loading

0 comments on commit a20b8c2

Please sign in to comment.