From da17fdf94105507c1e78efcae5f7b2af5955eb7e Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Thu, 18 Apr 2024 09:16:11 +0800 Subject: [PATCH] fix lint --- .eslintrc | 3 ++- src/util.ts | 8 ++++++-- tsconfig.json | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.eslintrc b/.eslintrc index bab550a..a8d6e4b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -18,6 +18,7 @@ "no-prototype-builtins": "off", "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-extra-semi": "off", - "semi": [2, "never"] + "semi": [2, "never"], + "no-control-regex": 0 } } diff --git a/src/util.ts b/src/util.ts index 99c34ed..5bb2066 100644 --- a/src/util.ts +++ b/src/util.ts @@ -105,11 +105,15 @@ export const unicodeSlug = (str: string, savedAt: string) => { } export const replaceIllegalCharsFile = (str: string): string => { - return removeInvisibleChars(str.replace(ILLEGAL_CHAR_REGEX_FILE, REPLACEMENT_CHAR)) + return removeInvisibleChars( + str.replace(ILLEGAL_CHAR_REGEX_FILE, REPLACEMENT_CHAR), + ) } export const replaceIllegalCharsFolder = (str: string): string => { - return removeInvisibleChars(str.replace(ILLEGAL_CHAR_REGEX_FOLDER, REPLACEMENT_CHAR)) + return removeInvisibleChars( + str.replace(ILLEGAL_CHAR_REGEX_FOLDER, REPLACEMENT_CHAR), + ) } export function formatDate(date: string, format: string): string { diff --git a/tsconfig.json b/tsconfig.json index f335682..2f78845 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,7 @@ "isolatedModules": true, "strictNullChecks": true, "esModuleInterop": true, - "lib": ["ES2021","ES2021.String", "DOM"] + "lib": ["ES2021", "ES2021.String", "DOM"] }, "include": ["src/**/*.ts"] }