-
Notifications
You must be signed in to change notification settings - Fork 0
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 #8 from inaiat/chore/add_log_method
chore: add log method
- Loading branch information
Showing
18 changed files
with
1,079 additions
and
2,487 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 |
---|---|---|
@@ -1 +1 @@ | ||
9d146d1eb0e64913b0cbe14edb802b84ec73ef9b | ||
05e544d9f7557435922ee406d0e6b43b252b7c31 |
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,26 @@ | ||
{ | ||
"lineWidth": 120, | ||
"typescript": { | ||
"quoteStyle": "preferSingle", | ||
"semiColons": "asi", | ||
"binaryExpression.operatorPosition": "sameLine", | ||
"newLineKind": "auto" | ||
}, | ||
"json": {}, | ||
"markdown": {}, | ||
"includes": [ | ||
"**/*.{ts,mjs,js,json}" | ||
], | ||
"excludes": [ | ||
"**/coverage", | ||
"**/report", | ||
"**/node_modules", | ||
"**/*-lock.json", | ||
"**/dist" | ||
], | ||
"plugins": [ | ||
"https://plugins.dprint.dev/typescript-0.90.4.wasm", | ||
"https://plugins.dprint.dev/json-0.19.2.wasm", | ||
"https://plugins.dprint.dev/markdown-0.17.0.wasm" | ||
] | ||
} |
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,80 @@ | ||
import eslint from '@eslint/js' | ||
import n from 'eslint-plugin-n' | ||
import unicorn from 'eslint-plugin-unicorn' | ||
import tseslint from 'typescript-eslint' | ||
|
||
const customRules = { | ||
'@typescript-eslint/array-type': ['error', { 'default': 'array-simple' }], | ||
'@typescript-eslint/consistent-type-exports': 'error', | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'@typescript-eslint/no-unused-vars': 'error', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
'args': 'all', | ||
'argsIgnorePattern': '^_', | ||
'caughtErrors': 'all', | ||
'caughtErrorsIgnorePattern': '^_', | ||
'destructuredArrayIgnorePattern': '^_', | ||
'varsIgnorePattern': '^_', | ||
'ignoreRestSiblings': true, | ||
}, | ||
], | ||
'no-console': 'error', | ||
|
||
'@typescript-eslint/no-unsafe-assignment': 'warn', | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
|
||
'capitalized-comments': 'off', | ||
'new-cap': 'off', | ||
'n/no-missing-import': 'off', | ||
'unicorn/prevent-abbreviations': 'off', | ||
|
||
'@typescript-eslint/consistent-type-definitions': 'off', | ||
'@typescript-eslint/member-delimiter-style': 'off', | ||
'@typescript-eslint/prefer-readonly-parameter-types': 'off', | ||
'@typescript-eslint/naming-convention': 'off', | ||
|
||
'@typescript-eslint/object-curly-spacing': 'off', | ||
|
||
'n/no-unpublished-import': 'off', | ||
'unicorn/import-style': 'off', | ||
'unicorn/no-array-method-this-argument': 'off', | ||
'unicorn/no-array-callback-reference': 'off', | ||
} | ||
|
||
const languageOptions = { | ||
parserOptions: { | ||
project: true, | ||
}, | ||
} | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
...tseslint.configs.stylisticTypeChecked, | ||
n.configs['flat/recommended-module'], | ||
unicorn.configs['flat/recommended'], | ||
{ | ||
ignores: ['*.mjs', 'dist', 'coverage/', 'report/'], | ||
}, | ||
{ | ||
languageOptions, | ||
rules: customRules, | ||
}, | ||
{ | ||
files: ['**/tests/**'], | ||
languageOptions, | ||
rules: { | ||
...customRules, | ||
'@typescript-eslint/require-await': 'off', | ||
'@typescript-eslint/no-misused-promises': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'no-console': 'off', | ||
'unicorn/no-null': 'off', | ||
'unicorn/no-await-expression-member': 'off', | ||
'unicorn/consistent-function-scoping': '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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "@inaiat/resultar", | ||
"version": "1.1.2", | ||
"exports": "./src/index.ts" | ||
} | ||
"name": "@inaiat/resultar", | ||
"version": "1.1.2", | ||
"exports": "./src/index.ts" | ||
} |
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,9 +1,9 @@ | ||
{ | ||
"name": "resultar", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Result pattern for typescript", | ||
"type": "module", | ||
"packageManager": "pnpm@9.0.6", | ||
"packageManager": "pnpm@9.4.0", | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.js", | ||
|
@@ -13,18 +13,19 @@ | |
}, | ||
"types": "dist/index.d.ts", | ||
"engines": { | ||
"node": ">=18" | ||
"node": ">=20" | ||
}, | ||
"outDir": "./dist", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "rimraf ./dist && mkdir dist && tsup && git rev-parse HEAD > BUILD_SHA", | ||
"lint": "xo", | ||
"lint:fix": "xo --fix", | ||
"build": "tsup && git rev-parse HEAD > BUILD_SHA", | ||
"format": "dprint fmt", | ||
"lint": "dprint check && eslint", | ||
"lint:fix": "dprint fmt && eslint --fix", | ||
"prepublishOnly": "pnpm run build", | ||
"test": "xo && tsx --test tests/*.ts", | ||
"test": "node --import=tsx/esm --test tests/*.ts", | ||
"typedoc": "typedoc", | ||
"prepare": "husky || true" | ||
}, | ||
|
@@ -51,19 +52,24 @@ | |
}, | ||
"homepage": "https://github.com/inaiat/resultar", | ||
"devDependencies": { | ||
"@types/node": "^20.12.11", | ||
"eslint-plugin-unused-imports": "^3.1.0", | ||
"@sinclair/typebox": "^0.32.33", | ||
"@types/node": "^20.14.5", | ||
"dprint": "^0.46.3", | ||
"eslint": "^9.5.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-n": "^17.9.0", | ||
"eslint-plugin-unicorn": "^54.0.0", | ||
"eslint-plugin-unused-imports": "^4.0.0", | ||
"husky": "^9.0.11", | ||
"rimraf": "^5.0.7", | ||
"semver": "^7.6.2", | ||
"testdouble": "^3.20.2", | ||
"tsup": "^8.0.2", | ||
"tsx": "^4.10.2", | ||
"tsup": "^8.1.0", | ||
"tsx": "^4.15.6", | ||
"typedoc": "^0.25.13", | ||
"typedoc-github-wiki-theme": "2.0.0", | ||
"typedoc-plugin-markdown": "4.0.1", | ||
"typedoc-plugin-markdown": "4.0.3", | ||
"typescript": "5.4.5", | ||
"xo": "0.58.0" | ||
"typescript-eslint": "^7.13.1" | ||
}, | ||
"tsup": { | ||
"sourcemap": true, | ||
|
@@ -82,14 +88,6 @@ | |
"directories": { | ||
"test": "test" | ||
}, | ||
"ava": { | ||
"extensions": { | ||
"ts": "module" | ||
}, | ||
"nodeArguments": [ | ||
"--loader=ts-node/esm" | ||
] | ||
}, | ||
"release": { | ||
"branches": [ | ||
{ | ||
|
@@ -106,57 +104,5 @@ | |
} | ||
] | ||
}, | ||
"xo": { | ||
"semicolon": false, | ||
"space": 2, | ||
"bracketSpacing": true, | ||
"plugins": [ | ||
"prettier", | ||
"unused-imports" | ||
], | ||
"rules": { | ||
"object-curly-spacing": [ | ||
"error", | ||
"always" | ||
], | ||
"capitalized-comments": "off", | ||
"unicorn/prevent-abbreviations": "off", | ||
"unicorn/no-array-callback-reference": "off", | ||
"unicorn/no-array-method-this-argument": "off", | ||
"new-cap": "off", | ||
"import/no-extraneous-dependencies": "off", | ||
"@typescript-eslint/member-delimiter-style": "off", | ||
"@typescript-eslint/prefer-readonly-parameter-types": "off", | ||
"@typescript-eslint/naming-convention": "off", | ||
"@typescript-eslint/consistent-type-imports": "off", | ||
"@typescript-eslint/consistent-type-definitions": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "warn", | ||
"@typescript-eslint/no-empty-function": "warn", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/object-curly-spacing": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_" | ||
} | ||
], | ||
"functional/no-classes": "off" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": "tests/*.ts", | ||
"rules": { | ||
"functional/no-method-signature": "off", | ||
"@typescript-eslint/prefer-readonly-parameter-types": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"functional/prefer-readonly-type": "off", | ||
"ava/use-test": "off", | ||
"unicorn/no-await-expression-member": "off", | ||
"prefer-promise-reject-errors": "off" | ||
} | ||
} | ||
] | ||
}, | ||
"author": "[email protected]" | ||
} | ||
} |
Oops, something went wrong.