Skip to content

Commit 26a3a66

Browse files
Dx 1102 (#1213)
* feat: add new linter * chore: format files * chore: add linted files * fix: copy readme & package.json & license to dist after build otherwise, we get MissingPackageJSON error when installing upstash/redis in our CI tests https://github.com/upstash/redis-js/actions/runs/10091669210/job/27903832137 installing with npm instead of bun solves the issue but we get another error when running: https://github.com/upstash/redis-js/actions/runs/10091973099/job/27904892427 * fix: remove flaky tests --------- Co-authored-by: CahidArda <[email protected]>
1 parent 42ebc46 commit 26a3a66

File tree

240 files changed

+1252
-1010
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+1252
-1010
lines changed

.eslintrc.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"env": {
3+
"es2024": true
4+
},
5+
"extends": [
6+
"eslint:recommended",
7+
"plugin:unicorn/recommended",
8+
"plugin:@typescript-eslint/recommended"
9+
],
10+
"plugins": ["@typescript-eslint", "unicorn"],
11+
"parserOptions": {
12+
"project": "./tsconfig.json"
13+
},
14+
"ignorePatterns": ["*.config.*", "examples", "dist"],
15+
"rules": {
16+
"no-console": ["error", { "allow": ["warn", "error"] }],
17+
"@typescript-eslint/no-magic-numbers": "off",
18+
"@typescript-eslint/unbound-method": "off",
19+
"@typescript-eslint/prefer-as-const": "error",
20+
"@typescript-eslint/consistent-type-imports": "error",
21+
"@typescript-eslint/no-explicit-any": "off",
22+
"@typescript-eslint/restrict-template-expressions": "off",
23+
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
24+
"@typescript-eslint/no-unused-vars": [
25+
"error",
26+
{ "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }
27+
],
28+
"@typescript-eslint/prefer-ts-expect-error": "off",
29+
"@typescript-eslint/no-misused-promises": [
30+
"error",
31+
{
32+
"checksVoidReturn": false
33+
}
34+
],
35+
"unicorn/prevent-abbreviations": "off",
36+
"no-implicit-coercion": ["error", { "boolean": true }],
37+
"no-extra-boolean-cast": ["error", { "enforceForLogicalOperands": true }],
38+
"no-unneeded-ternary": ["error", { "defaultAssignment": true }],
39+
"unicorn/no-array-reduce": ["off"],
40+
"unicorn/no-nested-ternary": "off",
41+
"unicorn/no-null": "off",
42+
"unicorn/filename-case": "off"
43+
}
44+
}

.gitignore

Lines changed: 169 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,175 @@
1-
.vscode/
2-
npm/
3-
node_modules/
1+
# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
2+
3+
# Logs
4+
5+
logs
6+
_.log
7+
npm-debug.log_
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
.pnpm-debug.log*
12+
13+
# Caches
14+
15+
.cache
16+
17+
# Diagnostic reports (https://nodejs.org/api/report.html)
18+
19+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
20+
21+
# Runtime data
22+
23+
pids
24+
_.pid
25+
_.seed
26+
*.pid.lock
27+
28+
# Directory for instrumented libs generated by jscoverage/JSCover
29+
30+
lib-cov
31+
32+
# Coverage directory used by tools like istanbul
33+
434
coverage
5-
.env*
6-
!.env.example
7-
.pnpm-debug.log
8-
dist/
9-
.idea/
10-
.next/
35+
*.lcov
36+
37+
# nyc test coverage
38+
39+
.nyc_output
40+
41+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
42+
43+
.grunt
44+
45+
# Bower dependency directory (https://bower.io/)
46+
47+
bower_components
48+
49+
# node-waf configuration
50+
51+
.lock-wscript
52+
53+
# Compiled binary addons (https://nodejs.org/api/addons.html)
54+
55+
build/Release
56+
57+
# Dependency directories
58+
59+
node_modules/
60+
jspm_packages/
61+
62+
# Snowpack dependency directory (https://snowpack.dev/)
63+
64+
web_modules/
65+
66+
# TypeScript cache
67+
68+
*.tsbuildinfo
69+
70+
# Optional npm cache directory
71+
72+
.npm
73+
74+
# Optional eslint cache
75+
76+
.eslintcache
77+
78+
# Optional stylelint cache
79+
80+
.stylelintcache
81+
82+
# Microbundle cache
83+
84+
.rpt2_cache/
85+
.rts2_cache_cjs/
86+
.rts2_cache_es/
87+
.rts2_cache_umd/
88+
89+
# Optional REPL history
90+
91+
.node_repl_history
92+
93+
# Output of 'npm pack'
94+
95+
*.tgz
96+
97+
# Yarn Integrity file
98+
99+
.yarn-integrity
100+
101+
# dotenv environment variable files
102+
103+
.env
104+
.env.development.local
105+
.env.test.local
106+
.env.production.local
107+
.env.local
108+
109+
# parcel-bundler cache (https://parceljs.org/)
110+
111+
.parcel-cache
112+
113+
# Next.js build output
114+
115+
.next
116+
out
117+
118+
# Nuxt.js build / generate output
119+
120+
.nuxt
121+
dist
122+
123+
# Gatsby files
124+
125+
# Comment in the public line in if your project uses Gatsby and not Next.js
126+
127+
# https://nextjs.org/blog/next-9-1#public-directory-support
128+
129+
# public
130+
131+
# vuepress build output
132+
133+
.vuepress/dist
134+
135+
# vuepress v2.x temp and cache directory
136+
137+
.temp
138+
139+
# Docusaurus cache and generated files
140+
141+
.docusaurus
142+
143+
# Serverless directories
144+
145+
.serverless/
146+
147+
# FuseBox cache
148+
149+
.fusebox/
150+
151+
# DynamoDB Local files
152+
153+
.dynamodb/
154+
155+
# TernJS port file
156+
157+
.tern-port
158+
159+
# Stores VSCode versions used for testing VSCode extensions
11160

12-
examples/**/yarn.lock
13-
examples/**/package-lock.json
14-
examples/**/pnpm-lock.yaml
161+
.vscode-test
15162

163+
# yarn v2
16164

165+
.yarn/cache
166+
.yarn/unplugged
167+
.yarn/build-state.yml
168+
.yarn/install-state.gz
169+
.pnp.*
17170

171+
# IntelliJ based IDEs
172+
.idea
18173

19-
# Local Netlify folder
20-
.netlify
21-
x/
174+
# Finder (MacOS) folder config
175+
.DS_Store

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bun --no -- commitlint --edit ""

.husky/pre-commit

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
31

42
bun run fmt && bun run test

.husky/pre-push

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bun run build

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/examples

.releaserc

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

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
3+
}

.vscode/settings.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"git.autofetch": true,
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll": "explicit"
6+
},
7+
"[json]": {
8+
"editor.defaultFormatter": "esbenp.prettier-vscode"
9+
},
10+
"[javascript]": {
11+
"editor.defaultFormatter": "esbenp.prettier-vscode"
12+
},
13+
"[jsonc]": {
14+
"editor.defaultFormatter": "esbenp.prettier-vscode"
15+
},
16+
"[typescript]": {
17+
"editor.defaultFormatter": "esbenp.prettier-vscode"
18+
},
19+
"editor.defaultFormatter": "esbenp.prettier-vscode"
20+
}

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ bun run test
119119
bun run build
120120
```
121121

122-
123122
### Telemetry
124123

125124
This library sends anonymous telemetry data to help us improve your experience.

0 commit comments

Comments
 (0)