-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add type aliases * make example use env vars * finish tests * add types * cleanup * add gha * clean up all files * add prettier lint * sep12 stuff linting * cleanup * move to devdeps
- Loading branch information
Showing
28 changed files
with
699 additions
and
170 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,59 @@ | ||
module.exports = { | ||
ignorePatterns: ["lib/", "node_modules/", "docs/"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: ["tsconfig.json", "examples/tsconfig.json", "test/tsconfig.json"], | ||
sourceType: "module", | ||
}, | ||
plugins: ["@typescript-eslint", "jsdoc"], | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
], | ||
rules: { | ||
// Off | ||
"@typescript-eslint/no-unsafe-argument": "off", | ||
"@typescript-eslint/no-floating-promises": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-unsafe-return": "off", | ||
"@typescript-eslint/prefer-regexp-exec": "off", | ||
"@typescript-eslint/restrict-template-expressions": "off", | ||
"@typescript-eslint/no-inferrable-types": "off", | ||
"@typescript-eslint/no-misused-promises": "off", | ||
"@typescript-eslint/no-base-to-string": "off", | ||
|
||
// Error | ||
"@typescript-eslint/no-shadow": "error", | ||
"@typescript-eslint/no-unused-expressions": "error", | ||
"@typescript-eslint/no-var-requires": "error", | ||
"@typescript-eslint/prefer-for-of": "error", | ||
"@typescript-eslint/prefer-function-type": "error", | ||
"@typescript-eslint/prefer-namespace-keyword": "error", | ||
"@typescript-eslint/triple-slash-reference": [ | ||
"error", | ||
{ | ||
path: "always", | ||
types: "prefer-import", | ||
lib: "always", | ||
}, | ||
], | ||
"@typescript-eslint/unified-signatures": "error", | ||
"@typescript-eslint/no-misused-new": "error", | ||
"@typescript-eslint/no-empty-function": "error", | ||
"@typescript-eslint/no-empty-interface": "error", | ||
"jsdoc/check-alignment": "error", | ||
"jsdoc/check-indentation": "error", | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["test/**", "examples/**"], | ||
rules: { | ||
"@typescript-eslint/no-shadow": "off", | ||
"@typescript-eslint/no-explicit-any": "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,14 @@ | ||
name: Run Tests | ||
on: [pull_request] | ||
jobs: | ||
test-ci: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
- run: yarn install | ||
- run: yarn build | ||
- run: yarn test:ci |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn pretty-quick --staged | ||
yarn lint-staged |
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,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"esModuleInterop": true, | ||
"baseUrl": "./", | ||
"outDir": "lib", | ||
"declaration": true, | ||
"declarationDir": "lib" | ||
}, | ||
"include": ["./"] | ||
} |
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
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
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
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
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
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
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
Oops, something went wrong.