Skip to content

Commit f3c1709

Browse files
committed
feat: check if function is async
0 parents  commit f3c1709

20 files changed

+19589
-0
lines changed

.eslintrc.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
commonjs: true,
5+
es2021: true,
6+
},
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:prettier/recommended',
10+
'plugin:node/recommended',
11+
],
12+
parserOptions: {
13+
ecmaVersion: 12,
14+
},
15+
rules: {},
16+
};

.github/workflows/release.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: master
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/setup-node@v1
12+
with:
13+
node-version: 14
14+
- uses: actions/checkout@v2
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
- run: npm cit
18+
19+
version:
20+
needs: [test]
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/setup-node@v1
24+
with:
25+
node-version: 14
26+
- uses: actions/checkout@v2
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Bump version and push tag
31+
id: changelog
32+
uses: TriPSs/conventional-changelog-action@v3
33+
with:
34+
preset: 'conventionalcommits'
35+
github-token: ${{ secrets.GITHUB_TOKEN }}
36+
git-message: 'chore(release): {version} [skip ci]'
37+
git-user-name: 'Simone Corsi'
38+
git-user-email: 'simonecorsi.dev@gmail.com'
39+
tag-prefix: ''
40+
41+
- name: Create github Release
42+
uses: actions/create-release@master
43+
if: ${{ steps.changelog.outputs.skipped == 'false' }}
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
tag_name: ${{ steps.changelog.outputs.tag }}
48+
release_name: ${{ steps.changelog.outputs.tag }}
49+
body: ${{ steps.changelog.outputs.changelog }}
50+
51+
- name: NPM Publish
52+
uses: JS-DevTools/npm-publish@v1
53+
if: ${{ steps.changelog.outputs.skipped == 'false' }}
54+
with:
55+
token: ${{ secrets.npm_token }}
56+
access: 'public'

.gitignore

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Microbundle cache
58+
.rpt2_cache/
59+
.rts2_cache_cjs/
60+
.rts2_cache_es/
61+
.rts2_cache_umd/
62+
63+
# Optional REPL history
64+
.node_repl_history
65+
66+
# Output of 'npm pack'
67+
*.tgz
68+
69+
# Yarn Integrity file
70+
.yarn-integrity
71+
72+
# dotenv environment variables file
73+
.env
74+
.env.test
75+
.env.production
76+
77+
# parcel-bundler cache (https://parceljs.org/)
78+
.cache
79+
.parcel-cache
80+
81+
# Next.js build output
82+
.next
83+
out
84+
85+
# Nuxt.js build / generate output
86+
.nuxt
87+
dist
88+
89+
# Gatsby files
90+
.cache/
91+
# Comment in the public line in if your project uses Gatsby and not Next.js
92+
# https://nextjs.org/blog/next-9-1#public-directory-support
93+
# public
94+
95+
# vuepress build output
96+
.vuepress/dist
97+
98+
# Serverless directories
99+
.serverless/
100+
101+
# FuseBox cache
102+
.fusebox/
103+
104+
# DynamoDB Local files
105+
.dynamodb/
106+
107+
# TernJS port file
108+
.tern-port
109+
110+
# Stores VSCode versions used for testing VSCode extensions
111+
.vscode-test
112+
113+
# yarn v2
114+
.yarn/cache
115+
.yarn/unplugged
116+
.yarn/build-state.yml
117+
.yarn/install-state.gz
118+
.pnp.*

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install lint-staged

.npmignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!dist/**
3+
!types/**

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry="https://registry.npmjs.org/"

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"tabWidth": 2,
3+
"singleQuote": true,
4+
"trailingComma": "es5"
5+
}

.taprc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
branches: 50
2+
functions: 95
3+
lines: 95
4+
statements: 95

.versionrc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
types: [
3+
{ type: "feat", section: "Features" },
4+
{ type: "fix", section: "Bug Fixes" },
5+
{ type: "chore", hidden: true },
6+
{ type: "docs", hidden: true },
7+
{ type: "style", hidden: true },
8+
{ type: "ci", section: "CI/CD" },
9+
{ type: "refactor", section: "Other" },
10+
{ type: "perf", section: "Other" },
11+
{ type: "test", section: "Other" },
12+
],
13+
};

CHANGELOG.md

Whitespace-only changes.

LICENSE.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
The MIT License (MIT)
2+
Copyright © 2021 Simone Corsi<simoencorsi.dev@gmail.com>
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5+
6+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7+
8+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# TODO
2+
3+
- [ ] Remove {{ PROJECT_NAME }} and {{ PROJECT_URL }}
4+
- [ ] Add `npm_token` secret to github to allow action to publish
5+
6+
# {{ PROJECT_NAME }}
7+
8+
<!-- PROJECT SHIELDS -->
9+
10+
<!-- ![tests](https://github.com/simonecorsi/{{ PROJECT_NAME }}/workflows/test/badge.svg) -->
11+
12+
<!-- toc -->
13+
14+
- [TODO](#todo)
15+
- [{{ PROJECT_NAME }}](#-project_name-)
16+
- [About The Project](#about-the-project)
17+
- [Installation](#installation)
18+
- [Usage](#usage)
19+
- [Contributing](#contributing)
20+
- [License](#license)
21+
- [Contact](#contact)
22+
23+
<!-- tocstop -->
24+
25+
## About The Project
26+
27+
28+
29+
<!-- GETTING STARTED -->
30+
31+
## Installation
32+
33+
```sh
34+
npm i --save @scdev/{{ PROJECT_NAME }}
35+
# OR
36+
yarn add
37+
```
38+
39+
<!-- USAGE EXAMPLES -->
40+
41+
## Usage
42+
43+
44+
45+
<!-- CONTRIBUTING -->
46+
47+
## Contributing
48+
49+
Project is pretty simple and straight forward for what is my needs, but if you have any idea you're welcome.
50+
51+
This projects uses [commitizen](https://github.com/commitizen/cz-cli) so be sure to use standard commit format or PR won't be accepted
52+
53+
1. Fork the Project
54+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
55+
3. Commit your Changes (`git commit -m 'feat(scope): some AmazingFeature'`)
56+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
57+
5. Open a Pull Request
58+
59+
<!-- LICENSE -->
60+
61+
## License
62+
63+
Distributed under the MIT License. See `LICENSE` for more information.
64+
65+
<!-- CONTACT -->
66+
67+
## Contact
68+
69+
Simone Corsi - [@im_simonecorsi](https://twitter.com/im_simonecorsi)

commitlint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ['@commitlint/config-conventional'] };

lint-staged.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
'*.{js,css,json,md,yaml,yml}': ['prettier --write'],
3+
'*.md': (filenames) => {
4+
const list = filenames.map((filename) => `'markdown-toc -i ${filename}`);
5+
return list;
6+
},
7+
'*.js': ['eslint --fix'],
8+
};

0 commit comments

Comments
 (0)