-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* π§ Add eslint prettier integration Also add editor config * β»οΈ Ignore tests marked with todo * π Run eslint fix * π§ Use mts for vitest config
- Loading branch information
Showing
18 changed files
with
168 additions
and
73 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,10 @@ | ||
root = true | ||
|
||
[*] | ||
[*] | ||
charset = utf-8 | ||
insert_final_newline = true | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
max_line_length = 140 |
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,16 +1,20 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"es2021": true | ||
}, | ||
"extends": "standard-with-typescript", | ||
"parserOptions": { | ||
"project": "./tsconfig.json", | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"@typescript-eslint/space-before-function-paren": ["error", "never"], | ||
"@typescript-eslint/prefer-nullish-coalescing": "off" | ||
} | ||
"env": { | ||
"node": true, | ||
"es2021": true | ||
}, | ||
"extends": "standard-with-typescript", | ||
"parserOptions": { | ||
"project": "./tsconfig.json", | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"@typescript-eslint/space-before-function-paren": [ | ||
"error", | ||
"never" | ||
], | ||
"@typescript-eslint/prefer-nullish-coalescing": "off", | ||
"@typescript-eslint/comma-dangle": "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,4 @@ | ||
{ | ||
"printWidth": 140, | ||
"tabWidth": 2, | ||
"singleQuote": true | ||
"singleQuote": true, | ||
"semi": false | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,15 +1,17 @@ | ||
export const escape = (str: string | number = ''): string => { | ||
return str | ||
.toString() | ||
// eslint-disable-next-line no-control-regex | ||
.replace(/\x1B.*?m/g, '') | ||
.replace(/\|/g, '||') | ||
.replace(/\n/g, '|n') | ||
.replace(/\r/g, '|r') | ||
.replace(/\[/g, '|[') | ||
.replace(/]/g, '|]') | ||
.replace(/\u0085/g, '|x') | ||
.replace(/\u2028/g, '|l') | ||
.replace(/\u2029/g, '|p') | ||
.replace(/'/g, "|'") | ||
return ( | ||
str | ||
.toString() | ||
// eslint-disable-next-line no-control-regex | ||
.replace(/\x1B.*?m/g, '') | ||
.replace(/\|/g, '||') | ||
.replace(/\n/g, '|n') | ||
.replace(/\r/g, '|r') | ||
.replace(/\[/g, '|[') | ||
.replace(/]/g, '|]') | ||
.replace(/\u0085/g, '|x') | ||
.replace(/\u2028/g, '|l') | ||
.replace(/\u2029/g, '|p') | ||
.replace(/'/g, "|'") | ||
) | ||
} |
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.