Skip to content

Commit a20b8c2

Browse files
Merge pull request #29 from renderforest/remove-vulnerable-deps
remove vulnerable deps
2 parents 3156370 + ae3103c commit a20b8c2

File tree

17 files changed

+6890
-352
lines changed

17 files changed

+6890
-352
lines changed

.babelrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintrc

Lines changed: 29 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
{
22
"extends": [
3-
"standard",
4-
"plugin:flowtype/recommended"
3+
"standard"
54
],
65
"globals": {
76
"expect": false,
87
"test": false,
98
"describe": false,
109
"jest": false,
11-
"afterAll": false
10+
"afterAll": false,
11+
"beforeAll": false
1212
},
13-
"plugins": [
14-
"flowtype"
15-
],
1613
"rules": {
17-
"curly": 0,
1814
"comma-dangle": [
1915
2,
2016
"never"
@@ -26,80 +22,49 @@
2622
"after": true
2723
}
2824
],
29-
"no-sequences": 0,
25+
"consistent-return": 0,
3026
"camelcase": 0,
31-
"no-proto": 0,
32-
"no-throw-literal": 0,
33-
"no-useless-escape": 0,
27+
"curly": 2,
3428
"eqeqeq": [
3529
2,
3630
"allow-null"
3731
],
38-
"key-spacing": 0,
39-
"no-underscore-dangle": 0,
40-
"no-unused-expressions": 0,
41-
"space-before-function-paren": 2,
32+
"global-require": 2,
33+
"handle-callback-err": 2,
34+
"indent": [
35+
2,
36+
2
37+
],
38+
"key-spacing": 2,
39+
"new-cap": 2,
40+
"no-cond-assign": 2,
41+
"no-extend-native": 2,
42+
"no-mixed-requires": 2,
43+
"no-new-require": 2,
44+
"no-proto": 2,
45+
"no-sequences": 2,
4246
"no-shadow": 0,
43-
"no-shadow-restricted-names": 0,
47+
"no-shadow-restricted-names": 2,
48+
"no-throw-literal": 2,
49+
"no-underscore-dangle": 0,
50+
"no-unused-expressions": 2,
4451
"no-use-before-define": [
4552
"error",
4653
{
4754
"functions": true,
4855
"classes": true
4956
}
5057
],
51-
"no-extend-native": 0,
5258
"no-var": 2,
53-
"new-cap": 0,
54-
"quotes": 2,
55-
"semi-spacing": 0,
56-
"space-unary-ops": 0,
57-
"space-infix-ops": 0,
58-
"consistent-return": 0,
5959
"object-curly-spacing": [
60-
"error",
61-
"always"
62-
],
63-
"strict": 0,
64-
"flowtype/boolean-style": [
65-
2,
66-
"boolean"
67-
],
68-
"flowtype/define-flow-type": 1,
69-
"flowtype/delimiter-dangle": [
70-
2,
71-
"never"
72-
],
73-
"flowtype/generic-spacing": [
74-
2,
75-
"never"
76-
],
77-
"flowtype/no-primitive-constructor-types": 2,
78-
"flowtype/no-types-missing-file-annotation": 2,
79-
"flowtype/no-weak-types": 0,
80-
"flowtype/object-type-delimiter": [
81-
2,
82-
"comma"
83-
],
84-
"flowtype/require-parameter-type": 0,
85-
"flowtype/require-valid-file-annotation": 2,
86-
"flowtype/space-after-type-colon": [
87-
2,
88-
"always"
89-
],
90-
"flowtype/space-before-generic-bracket": [
91-
2,
92-
"never"
93-
],
94-
"flowtype/space-before-type-colon": [
95-
2,
96-
"never"
97-
],
98-
"flowtype/union-intersection-spacing": [
9960
2,
10061
"always"
10162
],
102-
"flowtype/use-flow-type": 1,
103-
"flowtype/valid-syntax": 1
63+
"quotes": 2,
64+
"semi-spacing": 2,
65+
"space-before-function-paren": 2,
66+
"space-infix-ops": 2,
67+
"space-unary-ops": 2,
68+
"strict": 2
10469
}
10570
}

.flowconfig

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/ISSUE_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!--
2+
Thank you for reporting an issue.
3+
4+
Please fill in as much of the template below as you're able.
5+
6+
7+
If possible, please provide additional details that demonstrate the problem, keeping it as
8+
simple and free of external dependencies as you are able.
9+
-->
10+
11+
* **Expected Behavior**:
12+
* **Actual Behavior**:
13+
* **Steps to reproduce the behavior**:
14+
15+
<!-- Enter your issue details below this comment. -->
16+
17+
* **Issue additional details**:

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
language: node_js
22
sudo: false
33
node_js:
4-
- "6.9.1"
5-
- "8.8.1"
4+
- "6.13.1"
5+
- "8.9.3"
66
cache:
77
directories:
88
- node_modules
99
install:
1010
- npm install
1111
script:
12+
- npm run lint-no-fix
1213
- npm test

README.md

Lines changed: 6 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,11 @@
11
# notification-hooks
2-
Notification Hooks 🚨
2+
Notification Hooks.
33

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

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

12-
13-
# API ✍
14-
15-
Environment variables(s):
16-
17-
* SLACK_WEB_HOOK_URL
18-
19-
20-
## Slack API
21-
22-
#### notifyError(...)
23-
``` javascript
24-
const SlackHooks = require('notification-hooks').Slack
25-
26-
const options = {
27-
channel: '#media-upload',
28-
codeSnippet: false, // default value is `true`
29-
iconEmoji: ':lion_face:', // default value is ':fire:'
30-
text: 'Hello world!', // supports string, Object, Error
31-
username: '@albert @ryan'
32-
}
33-
34-
SlackHooks.notifyError(options).then().catch()
35-
```
36-
37-
#### notifyWarn(...)
38-
``` javascript
39-
const SlackHooks = require('notification-hooks').Slack
40-
41-
const options = {
42-
channel: '#backend',
43-
codeSnippet: false, // default value is `true`
44-
iconEmoji: ':bus:', // default value is ':warning:'
45-
text: 'Hi there!', // supports both string & Object
46-
username: '@cris @ryan'
47-
}
48-
49-
SlackHooks.notifyWarn(options).then().catch()
50-
```
51-
52-
#### notifyInfo(...)
53-
``` javascript
54-
const SlackHooks = require('notification-hooks').Slack
55-
56-
const options = {
57-
channel: '#front',
58-
codeSnippet: true, // default value is `true`
59-
iconEmoji: ':airplane:', // default value is ':information_source:'
60-
text: 'Hello!', // supports both string & Object
61-
username: '@john'
62-
}
63-
64-
SlackHooks.notifyError(options).then().catch()
65-
```
66-
67-
# Development ⚠
68-
In case you add new third party dependencies, use flow-typed npm package to add annotations for that packages.
69-
* npm i -g flow-typed
70-
* flow-typed install --ignoreDeps dev
71-
7+
Table of Contents
8+
9+
* [API](https://github.com/renderforest/notification-hooks/blob/master/doc/API.md)
10+
* [Contributing](https://github.com/renderforest/notification-hooks/blob/master/CONTRIBUTING.md)
11+
* [Test](https://github.com/renderforest/notification-hooks/blob/master/doc/TEST.md)

__mocks__/request-promise.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
'use strict'
2-
31
module.exports = (params) => Promise.resolve(params)

dist/index.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)