-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from authts/switch-to-esbuild
switch to esbuild
- Loading branch information
Showing
31 changed files
with
12,947 additions
and
15,086 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
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,3 @@ | ||
node_modules/ | ||
dist/ | ||
lib/ |
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,57 @@ | ||
plugins: | ||
- "@typescript-eslint" | ||
- testing-library | ||
env: | ||
browser: true | ||
node: true | ||
parserOptions: | ||
ecmaVersion: 2020 | ||
sourceType: module | ||
extends: | ||
- eslint:recommended | ||
- plugin:testing-library/dom | ||
rules: | ||
consistent-return: error | ||
indent: | ||
- error | ||
- 4 | ||
- SwitchCase: 1 | ||
quotes: error | ||
semi: error | ||
keyword-spacing: error | ||
space-before-blocks: error | ||
no-multiple-empty-lines: | ||
- error | ||
- max: 1 | ||
maxEOF: 0 | ||
overrides: | ||
- files: ["*.ts", "*.tsx"] | ||
parserOptions: | ||
project: | ||
- ./tsconfig.json | ||
- ./test/tsconfig.json | ||
- ./example/tsconfig.json | ||
extends: | ||
- plugin:@typescript-eslint/recommended | ||
- plugin:@typescript-eslint/recommended-requiring-type-checking | ||
rules: | ||
indent: "off" | ||
"@typescript-eslint/indent": | ||
- error | ||
- 4 | ||
- SwitchCase: 1 | ||
"@typescript-eslint/member-delimiter-style": error | ||
"@typescript-eslint/explicit-module-boundary-types": | ||
- error | ||
- allowArgumentsExplicitlyTypedAsAny: true | ||
"@typescript-eslint/object-curly-spacing": | ||
- error | ||
- always | ||
# custom rules to fix code style | ||
"@typescript-eslint/no-explicit-any": "off" | ||
- files: src/**/* | ||
env: | ||
node: false | ||
- files: test/**/* | ||
env: | ||
jest: true |
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,3 @@ | ||
# Set the language for these files to json5 to ensure GitHub doesn't show the comments as errors | ||
/.vscode/*.json linguist-language=JSON5 | ||
/api-extractor.json linguist-language=JSON5 |
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
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 |
---|---|---|
|
@@ -7,18 +7,33 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
node-version: [16.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
env: | ||
CI: true | ||
|
||
- run: npm install | ||
- run: npm run build | ||
- run: npm run lint | ||
- run: npm test | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
env: | ||
CI: true | ||
|
||
- name: Cache incremental builds | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
.eslintcache | ||
lib/ | ||
**/*.tsbuildinfo | ||
**/node_modules/.cache | ||
key: build-${{ github.head_ref }}-${{ github.sha }} | ||
restore-keys: | | ||
build-${{ github.head_ref }}- | ||
build-refs/heads/main- | ||
# library | ||
- run: npm install | ||
- run: npm run lint | ||
- run: npm test | ||
- run: npm pack --dry-run |
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 |
---|---|---|
|
@@ -10,16 +10,30 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
node-version: [16.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
env: | ||
CI: true | ||
|
||
- run: npm install | ||
- run: npm run build | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
env: | ||
CI: true | ||
|
||
- name: Cache incremental builds | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
.eslintcache | ||
lib/ | ||
**/*.tsbuildinfo | ||
**/node_modules/.cache | ||
key: build-${{ github.ref }}-${{ github.sha }} | ||
restore-keys: | | ||
build-${{ github.ref }}- | ||
build-refs/heads/main- | ||
- run: npm install | ||
- run: npm run build |
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 |
---|---|---|
@@ -1,5 +1,15 @@ | ||
# build artifacts | ||
*.tsbuildinfo | ||
lib/ | ||
dist/ | ||
|
||
# caches | ||
.eslintcache | ||
.cache | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
*.log | ||
.DS_Store | ||
node_modules | ||
.cache | ||
dist | ||
temp/ |
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 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
Oops, something went wrong.