build: upgrade prettier

This commit is contained in:
EnixCoda 2026-01-17 22:57:03 +08:00
parent 7560895fff
commit 5352526d74
7 changed files with 1078 additions and 310 deletions

View file

@ -1,4 +1,4 @@
*-profile/ *-profile/
dist/ dist/
vscode-icons/ /vscode-icons
Safari Safari

View file

@ -67,8 +67,8 @@
"@types/react-dom": "^18.0.3", "@types/react-dom": "^18.0.3",
"@types/react-window": "^1.8.5", "@types/react-window": "^1.8.5",
"@types/styled-components": "^5.1.25", "@types/styled-components": "^5.1.25",
"@typescript-eslint/eslint-plugin": "^5.33.1", "@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^5.33.1", "@typescript-eslint/parser": "^7.18.0",
"babel-loader": "^8.2.5", "babel-loader": "^8.2.5",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"clean-webpack-plugin": "^4.0.0", "clean-webpack-plugin": "^4.0.0",
@ -76,10 +76,10 @@
"css-loader": "^2.1.0", "css-loader": "^2.1.0",
"dotenv": "^6.2.0", "dotenv": "^6.2.0",
"dotenv-webpack": "^8.1.0", "dotenv-webpack": "^8.1.0",
"eslint": "^8.15.0", "eslint": "^8.57.1",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.29.4", "eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^4.5.0", "eslint-plugin-react-hooks": "^5.2.0",
"file-loader": "^3.0.1", "file-loader": "^3.0.1",
"fork-ts-checker-webpack-plugin": "^9.0.2", "fork-ts-checker-webpack-plugin": "^9.0.2",
"husky": "^8.0.1", "husky": "^8.0.1",
@ -89,7 +89,7 @@
"lint-staged": "^13.0.3", "lint-staged": "^13.0.3",
"mini-css-extract-plugin": "^2.9.0", "mini-css-extract-plugin": "^2.9.0",
"patch-package": "^8.0.0", "patch-package": "^8.0.0",
"prettier": "^2.8.3", "prettier": "^3.8.0",
"raw-loader": "^4.0.0", "raw-loader": "^4.0.0",
"sass": "^1.26.2", "sass": "^1.26.2",
"sass-loader": "^8.0.2", "sass-loader": "^8.0.2",

View file

@ -33,7 +33,7 @@ export function SearchBar({ onSearch, onFocus, value }: Props) {
({ ({
regex: isValidRegexpSource(value), regex: isValidRegexpSource(value),
fuzzy: true, fuzzy: true,
}[searchMode]), })[searchMode],
[value, searchMode], [value, searchMode],
) )
const isSupportedRegex = useMemo( const isSupportedRegex = useMemo(
@ -45,8 +45,8 @@ export function SearchBar({ onSearch, onFocus, value }: Props) {
? !isInputValid ? !isInputValid
? 'Invalid regular expression.' ? 'Invalid regular expression.'
: !isSupportedRegex : !isSupportedRegex
? `Highlight is not supported for regular expression containing '?:', '?=', '?!', '?<=', or '?<!.'` ? `Highlight is not supported for regular expression containing '?:', '?=', '?!', '?<=', or '?<!.'`
: null : null
: null : null
const [focused, setFocused] = React.useState(false) const [focused, setFocused] = React.useState(false)

View file

@ -152,8 +152,8 @@ export const GitHub: Platform = {
const branchUrl = pullId const branchUrl = pullId
? `${repoUrl}/pull/${pullId}` ? `${repoUrl}/pull/${pullId}`
: commitId && URLHelper.isPossiblyCommitSHA(commitId) : commitId && URLHelper.isPossiblyCommitSHA(commitId)
? `${repoUrl}/tree/${commitId}` ? `${repoUrl}/tree/${commitId}`
: `${repoUrl}/tree/${branchName}` : `${repoUrl}/tree/${branchName}`
return { return {
repoUrl, repoUrl,
userUrl, userUrl,
@ -172,8 +172,8 @@ export const GitHub: Platform = {
shouldExpandSideBar() { shouldExpandSideBar() {
return Boolean( return Boolean(
(DOMHelper.isInCodePage() || URLHelper.isInCommitPage() || URLHelper.isInPullPage()) && (DOMHelper.isInCodePage() || URLHelper.isInCommitPage() || URLHelper.isInPullPage()) &&
!DOMHelper.isNativeFileTreeShown() && !DOMHelper.isNativeFileTreeShown() &&
!DOMHelper.isNativePRFileTreeShown(), !DOMHelper.isNativePRFileTreeShown(),
) )
}, },
shouldExpandAll() { shouldExpandAll() {

View file

@ -184,7 +184,7 @@ export const Gitee: Platform = {
mapErrorMessage: (error: Error) => mapErrorMessage: (error: Error) =>
({ ({
['Only signed in user is allowed to call APIs.']: errors.BAD_CREDENTIALS, ['Only signed in user is allowed to call APIs.']: errors.BAD_CREDENTIALS,
}[error.message]), })[error.message],
} }
export function useGiteeAttachCopySnippetButton(copySnippetButton: boolean) { export function useGiteeAttachCopySnippetButton(copySnippetButton: boolean) {

View file

@ -1,9 +1,11 @@
export interface $ { export interface $ {
<E extends HTMLElement>(selector: string): E | null <E extends HTMLElement>(selector: string): E | null
<R1>(selector: string, existCallback: (element: HTMLElement) => R1): R1 | null <R1>(selector: string, existCallback: (element: HTMLElement) => R1): R1 | null
<R1, R2>(selector: string, existCallback: (element: HTMLElement) => R1, otherwise: () => R2): <R1, R2>(
| R1 selector: string,
| R2 existCallback: (element: HTMLElement) => R1,
otherwise: () => R2,
): R1 | R2
<E extends HTMLElement, R2>( <E extends HTMLElement, R2>(
selector: string, selector: string,
existCallback: undefined | null, existCallback: undefined | null,

1348
yarn.lock

File diff suppressed because it is too large Load diff