Skip to content

Commit b1504b2

Browse files
committed
Initial commit
0 parents  commit b1504b2

19 files changed

+633
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
indent_style = space
7+
indent_size = 2
8+
charset = utf-8
9+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/coverage/**/*
2+
*.d.ts

.eslintrc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"root": true,
3+
"plugins": [
4+
"jsdoc",
5+
"unicorn"
6+
],
7+
"extends": [
8+
"@socketsecurity",
9+
"plugin:jsdoc/recommended"
10+
],
11+
"settings": {
12+
"jsdoc": {
13+
"mode": "typescript"
14+
}
15+
},
16+
"parserOptions": {
17+
"project": "./tsconfig.json"
18+
},
19+
"rules": {
20+
"@typescript-eslint/quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": false }],
21+
"no-console": "warn",
22+
23+
"jsdoc/check-types": "off",
24+
"jsdoc/no-undefined-types": "off",
25+
"jsdoc/require-jsdoc": "warn",
26+
"jsdoc/require-param-description": "off",
27+
"jsdoc/require-property-description": "off",
28+
"jsdoc/require-returns-description": "off",
29+
"jsdoc/require-yields": "off",
30+
"jsdoc/valid-types": "off",
31+
32+
"unicorn/expiring-todo-comments": "warn"
33+
}
34+
}

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
- package-ecosystem: "npm"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
day: "monday"

.github/workflows/lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Linting
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- '*'
9+
pull_request:
10+
branches:
11+
- master
12+
13+
permissions:
14+
contents: read
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
linting:
22+
name: "Linting"
23+
uses: SocketDev/workflows/.github/workflows/reusable-base.yml@master
24+
with:
25+
no-lockfile: true
26+
npm-test-script: 'check'

.github/workflows/nodejs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- '*'
9+
pull_request:
10+
branches:
11+
- master
12+
13+
permissions:
14+
contents: read
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
test:
22+
name: "Tests"
23+
uses: SocketDev/workflows/.github/workflows/reusable-base.yml@master
24+
with:
25+
no-lockfile: true
26+
npm-test-script: 'test-ci'
27+
node-versions: '14,16,18,19'
28+
# We currently have some issues on Windows that will have to wait to be fixed
29+
# os: 'ubuntu-latest,windows-latest'
30+
os: 'ubuntu-latest'

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Basic ones
2+
/coverage
3+
/coverage-ts
4+
/node_modules
5+
/.env
6+
/.nyc_output
7+
/.vscode
8+
9+
# We're a library, so please, no lock files
10+
/package-lock.json
11+
/yarn.lock
12+
13+
# Generated types
14+
*.d.ts
15+
*.d.ts.map
16+
!/lib/types/**/*.d.ts
17+
18+
# Library specific ones
19+
!/.vscode/extensions.json

.husky/pre-push

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

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2022 Socket Inc
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
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,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)