Skip to content

Commit 5964c3e

Browse files
committed
chore: use express-rate-limit prettier and tsconfig packages
1 parent f6255fd commit 5964c3e

20 files changed

+574
-525
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ body:
5050
- type: input
5151
attributes:
5252
label: Redis Client
53-
description: Which Redis client do you use to connect with the Redis server?
53+
description:
54+
Which Redis client do you use to connect with the Redis server?
5455
validations:
5556
required: true

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ body:
1717
- type: textarea
1818
attributes:
1919
label: Why
20-
description: Why should we add this feature? What are potential use cases for it?
20+
description:
21+
Why should we add this feature? What are potential use cases for it?
2122
validations:
2223
required: true
2324
- type: textarea
2425
attributes:
2526
label: Alternatives
26-
description: Describe the alternatives you have considered, or existing workarounds
27+
description:
28+
Describe the alternatives you have considered, or existing workarounds
2729
validations:
2830
required: true

.github/dependabot.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
version: 2
22
updates:
33
# Update npm packages if they're found weekly.
4-
- package-ecosystem: "npm"
5-
directory: "/"
4+
- package-ecosystem: 'npm'
5+
directory: '/'
66
schedule:
7-
interval: "weekly"
7+
interval: 'weekly'
88

99
# Update Github Actions if they're found weekly.
10-
- package-ecosystem: "github-actions"
11-
directory: "/"
10+
- package-ecosystem: 'github-actions'
11+
directory: '/'
1212
schedule:
13-
interval: "weekly"
13+
interval: 'weekly'

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/setup-node@v2
2222
with:
2323
node-version: ${{ matrix.node-version }}
24-
registry-url: "https://registry.npmjs.org/"
24+
registry-url: 'https://registry.npmjs.org/'
2525
- name: Check for lint/formatting errors
2626
run: |
2727
npm install
@@ -40,7 +40,7 @@ jobs:
4040
uses: actions/setup-node@v2
4141
with:
4242
node-version: ${{ matrix.node-version }}
43-
registry-url: "https://registry.npmjs.org/"
43+
registry-url: 'https://registry.npmjs.org/'
4444
- name: Run library tests
4545
run: |
4646
npm install

.github/workflows/publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish
33
on:
44
push:
55
tags:
6-
- "v*"
6+
- 'v*'
77

88
jobs:
99
publish:
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/setup-node@v2
1717
with:
1818
node-version: 16
19-
registry-url: "https://registry.npmjs.org/"
19+
registry-url: 'https://registry.npmjs.org/'
2020
- name: Install dependencies
2121
run: npm install
2222
- name: Publish package to NPM
@@ -31,5 +31,6 @@ jobs:
3131
uses: softprops/action-gh-release@v1
3232
with:
3333
files: rate-limit-redis.tgz
34-
body: You can view the changelog
34+
body:
35+
You can view the changelog
3536
[here](https://github.com/wyattjoh/rate-limit-redis/blob/main/changelog.md).

.prettierignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules/
2+
dist/
3+
coverage/
4+
5+
.idea/
6+
.vscode/
7+
8+
*.log
9+
*.tgz
10+
*.bak
11+
*.tmp
12+
13+
yarn.lock
14+
pnpm-lock.yaml

config/jest.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"rootDir": "../",
3+
"verbose": true,
4+
"preset": "ts-jest/presets/default-esm",
5+
"globals": {
6+
"ts-jest": {
7+
"useESM": true
8+
}
9+
},
10+
"collectCoverage": true,
11+
"collectCoverageFrom": ["source/**/*.ts"],
12+
"testTimeout": 30000,
13+
"testMatch": ["**/test/**/*-test.[jt]s"],
14+
"moduleFileExtensions": ["js", "json", "ts"],
15+
"moduleNameMapper": {
16+
"^(\\.{1,2}/.*)\\.js$": "$1"
17+
}
18+
}

contributing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ rate-limit-redis
109109

110110
When adding a new feature/fixing a bug, please add/update the readme and
111111
changelog as well as add tests for the same. Also make sure your code has been
112-
linted and that existing tests pass. You can run the linter using `npm run lint`,
113-
the tests using `npm run test` and try to automatically fix most lint issues using
114-
`npm run autofix`.
112+
linted and that existing tests pass. You can run the linter using
113+
`npm run lint`, the tests using `npm run test` and try to automatically fix most
114+
lint issues using `npm run autofix`.
115115

116116
Once you have made changes to the code, you will want to
117117
[`commit`](https://github.com/git-guides/git-commit) (basically, Git's version
@@ -164,8 +164,8 @@ your branch to include those changes. To rebase, or include the changes from the
164164
```
165165

166166
This will automatically add the changes from `main` branch of the
167-
`express-rate-limit/rate-limit-redis` repository to the current branch. If you encounter
168-
any merge conflicts, follow
167+
`express-rate-limit/rate-limit-redis` repository to the current branch. If you
168+
encounter any merge conflicts, follow
169169
[this guide](https://docs.github.com/en/get-started/using-git/resolving-merge-conflicts-after-a-git-rebase)
170170
to resolve them.
171171

license.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
MIT License
22

3-
Copyright (c) 2021 Wyatt Johnson
3+
Copyright (c) 2023 Wyatt Johnson, Nathan Friedly, Vedant K
44

5-
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+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
611

7-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
814

9-
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.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

package-lock.json

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)