Skip to content

Commit

Permalink
v2 refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
szilanor committed Jul 27, 2024
1 parent 6ca059e commit 0bdae6e
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 21 deletions.
21 changes: 1 addition & 20 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
module.exports = {
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
root: true,

rules: {
"@typescript-eslint/no-unused-vars": [
"warn",
// Unused variables are fine if they start with an underscore
{ args: "all", argsIgnorePattern: "^_.*", varsIgnorePattern: "^_.*" },
],
},

overrides: [
{
files: ["test/**"],

// Special config for test files
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
},
},
],
};
157 changes: 157 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.7.0",
"prettier": "^3.3.3",
"ts-jest": "^29.2.3",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export * from "./types";
export * from "./stream";
export * from "./async-stream";
export * from "./utils/util-types";
export * from "./utils/type-guards";
export * from "./utils/type-guards";
1 change: 1 addition & 0 deletions src/utils/type-guards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export function isNotNull<T>(
return value !== null && value !== undefined;
}

// eslint-disable-next-line @typescript-eslint/ban-types
export function isFunction(x: unknown): x is Function {
return typeof x === "function";
}
Expand Down

0 comments on commit 0bdae6e

Please sign in to comment.