Skip to content

Commit

Permalink
chore: add tests
Browse files Browse the repository at this point in the history
* chore: add tests

* build: bump version
  • Loading branch information
DanielMuller authored Oct 25, 2024
1 parent 98409c0 commit 9aa5d82
Show file tree
Hide file tree
Showing 9 changed files with 6,127 additions and 2,021 deletions.
19 changes: 0 additions & 19 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- run: npm run test:lint
unit:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
52 changes: 52 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import globals from "globals";
import ts from "@typescript-eslint/eslint-plugin";
import eslintConfigPrettier from "eslint-config-prettier";
import tsParser from "@typescript-eslint/parser";
export default [
eslintConfigPrettier,
{
languageOptions: {
parser: tsParser,
parserOptions: {
warnOnUnsupportedTypeScriptVersion: false,
},
globals: {
...globals.node,
},
},
files: ["src/**/*.ts", "test/**/*.ts"],
plugins: {
"@typescript-eslint": ts,
},
rules: {
"linebreak-style": ["error", "unix"],

"no-case-declarations": "off",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/explicit-function-return-type": ["error", { allowExpressions: true }],
"@typescript-eslint/naming-convention": [
"error",
{
selector: "interface",
format: ["PascalCase"],
},
{
selector: "function",
format: ["camelCase"],
leadingUnderscore: "allow",
},
],
"@typescript-eslint/no-inferrable-types": [
"warn",
{
ignoreParameters: true,
},
],
"@typescript-eslint/no-unused-vars": ["error", { args: "none" }],
},
},
{
ignores: ["coverage/**/*", "examples/**/*", "lib/**/*"],
},
];
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @type {import('ts-jest').JestConfigWithTsJest} **/
module.exports = {
testEnvironment: "node",
transform: {
"^.+.tsx?$": ["ts-jest",{}],
},
};
Loading

0 comments on commit 9aa5d82

Please sign in to comment.