-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9707ddc
Showing
78 changed files
with
20,776 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
const { configure, presets } = require('eslint-kit'); | ||
|
||
module.exports = configure({ | ||
presets: [ | ||
presets.imports({ | ||
sort: { | ||
newline: true, | ||
groups: [ | ||
// side effects | ||
['^\\u0000'], | ||
|
||
// node.js libraries, react libraries, scoped libraries | ||
['^(node:)?(child_process|crypto|events|fs|http|https|os|path)(/.*)?$', '^@?\\w'], | ||
|
||
// parent imports | ||
['^\\.\\.'], | ||
|
||
// sibling imports | ||
['^\\.'], | ||
], | ||
}, | ||
}), | ||
presets.node(), | ||
presets.typescript({ | ||
root: '.', | ||
tsconfig: 'tsconfig.lint.json', | ||
}), | ||
], | ||
extend: { | ||
root: true, | ||
env: { es2020: true }, | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/eslint-recommended'], | ||
ignorePatterns: ['dist', '.eslintrc.cjs'], | ||
overrides: [ | ||
{ | ||
files: ['*.ts', '*.tsx'], | ||
parser: '@typescript-eslint/parser', | ||
rules: { | ||
'@typescript-eslint/consistent-type-imports': ['warn', { fixStyle: 'inline-type-imports' }], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'warn', | ||
{ | ||
ignoreRestSiblings: true, | ||
varsIgnorePattern: '^_', | ||
argsIgnorePattern: '^_', | ||
}, | ||
], | ||
|
||
//#region @eslint-typescript/stylistic | ||
'@typescript-eslint/adjacent-overload-signatures': 'error', | ||
'@typescript-eslint/array-type': ['error', { default: 'array-simple', readonly: 'array-simple' }], | ||
'@typescript-eslint/class-literal-property-style': 'error', | ||
'@typescript-eslint/consistent-generic-constructors': 'error', | ||
'@typescript-eslint/consistent-indexed-object-style': 'error', | ||
'@typescript-eslint/consistent-type-assertions': 'error', | ||
'@typescript-eslint/consistent-type-definitions': 'error', | ||
'@typescript-eslint/no-confusing-non-null-assertion': 'error', | ||
'no-empty-function': 'off', | ||
'@typescript-eslint/no-empty-function': 'error', | ||
'@typescript-eslint/no-empty-interface': 'error', | ||
'@typescript-eslint/no-inferrable-types': 'error', | ||
'@typescript-eslint/prefer-for-of': 'error', | ||
'@typescript-eslint/prefer-function-type': 'error', | ||
'@typescript-eslint/prefer-namespace-keyword': 'error', | ||
//#endregion @eslint-typescript/stylistic | ||
'@typescript-eslint/switch-exhaustiveness-check': 'error', | ||
}, | ||
}, | ||
{ | ||
files: ['*.d.ts'], | ||
rules: { | ||
'no-inner-declarations': 'off', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
}, | ||
}, | ||
], | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"extends": [ | ||
"config:js-lib" | ||
], | ||
"labels":[ | ||
"renovate-bot" | ||
], | ||
"ignoreDeps": [ | ||
"node", | ||
"@types/node", | ||
"npm" | ||
], | ||
"automerge": true, | ||
"automergeType": "pr", | ||
"platformAutomerge": true, | ||
"schedule": ["before 4am on the first day of the month"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
name: Checking | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
|
||
jobs: | ||
prepare: | ||
name: Prepare | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Cache dependencies | ||
id: cache-deps | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./node_modules | ||
key: deps-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-deps.outputs.cache-hit != 'true' | ||
run: npm clean-install | ||
|
||
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | ||
run: npm audit signatures | ||
|
||
- name: Cache testing dependencies | ||
id: cache-test-deps | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./test/node_modules | ||
key: test-deps-${{ hashFiles('test/package-lock.json') }} | ||
|
||
- name: Install testing dependencies | ||
if: steps.cache-test-deps.outputs.cache-hit != 'true' | ||
run: npm clean-install | ||
working-directory: test | ||
|
||
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | ||
run: npm audit signatures | ||
working-directory: test | ||
|
||
lint: | ||
name: Linting | ||
needs: | ||
- prepare | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Restore dependencies | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ./node_modules | ||
key: deps-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Restore testing dependencies | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ./test/node_modules | ||
key: test-deps-${{ hashFiles('test/package-lock.json') }} | ||
|
||
- name: Run linter | ||
run: npm run lint | ||
|
||
typecheck: | ||
name: Type checking | ||
needs: | ||
- prepare | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Restore dependencies | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ./node_modules | ||
key: deps-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Restore testing dependencies | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ./test/node_modules | ||
key: test-deps-${{ hashFiles('test/package-lock.json') }} | ||
|
||
- name: Run typecheck | ||
run: npm run typecheck | ||
|
||
tests: | ||
name: Tests | ||
needs: | ||
- prepare | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Restore dependencies | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ./node_modules | ||
key: deps-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Restore testing dependencies | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ./test/node_modules | ||
key: test-deps-${{ hashFiles('test/package-lock.json') }} | ||
|
||
- name: Run tests | ||
run: npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- next | ||
- beta | ||
- alpha | ||
- rc | ||
|
||
permissions: | ||
contents: read # for checkout | ||
|
||
jobs: | ||
prepare: | ||
name: Prepare | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Cache dependencies | ||
id: cache-deps | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./node_modules | ||
key: deps-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-deps.outputs.cache-hit != 'true' | ||
run: npm clean-install | ||
|
||
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | ||
run: npm audit signatures | ||
|
||
release: | ||
name: Release | ||
needs: | ||
- prepare | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_TOKEN_SEMANTIC_RELEASE }} | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Restore dependencies | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ./node_modules | ||
key: deps-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Release | ||
run: npm run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
dist | ||
CHANGELOG.md | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
The ISC License | ||
|
||
Copyright (c) 2024, Aleksey Shelementev <[email protected]> | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any purpose | ||
with or without fee is hereby granted, provided that the above copyright notice | ||
and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL | ||
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL | ||
THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR | ||
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING | ||
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF | ||
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
Oops, something went wrong.