chore: update Prettier configuration and dependencies; refactor code formatting for consistency (#3926)

This commit is contained in:
Tunglies
2025-06-28 18:37:53 +08:00
committed by GitHub
Unverified
parent 82af9ed78e
commit bea6a2c8f7
7 changed files with 45 additions and 17 deletions

View File

@@ -1,6 +1,16 @@
{
"singleQuote": true,
"semi": false,
"trailingComma": "none",
"experimentalOperatorPosition": "start"
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf",
"embeddedLanguageFormatting": "auto"
}

View File

@@ -46,7 +46,6 @@
"@tauri-apps/plugin-updater": "2.9.0",
"@tauri-apps/plugin-window-state": "^2.3.0",
"@types/json-schema": "^7.0.15",
"json-schema": "^0.4.0",
"ahooks": "^3.8.5",
"axios": "^1.10.0",
"chart.js": "^4.5.0",
@@ -56,6 +55,7 @@
"glob": "^11.0.3",
"i18next": "^25.2.1",
"js-yaml": "^4.1.0",
"json-schema": "^0.4.0",
"lodash-es": "^4.17.21",
"monaco-editor": "^0.52.2",
"monaco-yaml": "^5.4.0",
@@ -92,6 +92,7 @@
"meta-json-schema": "^1.19.11",
"node-fetch": "^3.3.2",
"prettier": "^3.6.2",
"prettier-plugin-organize-imports": "^4.1.0",
"sass": "^1.89.2",
"terser": "^5.43.1",
"typescript": "^5.8.3",
@@ -99,12 +100,6 @@
"vite-plugin-monaco-editor": "^1.1.0",
"vite-plugin-svgr": "^4.3.0"
},
"prettier": {
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"endOfLine": "lf"
},
"type": "module",
"packageManager": "pnpm@9.13.2"
}

18
pnpm-lock.yaml generated
View File

@@ -204,6 +204,9 @@ importers:
prettier:
specifier: ^3.6.2
version: 3.6.2
prettier-plugin-organize-imports:
specifier: ^4.1.0
version: 4.1.0(prettier@3.6.2)(typescript@5.8.3)
sass:
specifier: ^1.89.2
version: 1.89.2
@@ -2471,6 +2474,16 @@ packages:
resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==}
engines: {node: ^10 || ^12 || >=14}
prettier-plugin-organize-imports@4.1.0:
resolution: {integrity: sha512-5aWRdCgv645xaa58X8lOxzZoiHAldAPChljr/MT0crXVOWTZ+Svl4hIWlz+niYSlO6ikE5UXkN1JrRvIP2ut0A==}
peerDependencies:
prettier: '>=2.0'
typescript: '>=2.9'
vue-tsc: ^2.1.0
peerDependenciesMeta:
vue-tsc:
optional: true
prettier@3.6.2:
resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==}
engines: {node: '>=14'}
@@ -5406,6 +5419,11 @@ snapshots:
picocolors: 1.1.1
source-map-js: 1.2.1
prettier-plugin-organize-imports@4.1.0(prettier@3.6.2)(typescript@5.8.3):
dependencies:
prettier: 3.6.2
typescript: 5.8.3
prettier@3.6.2: {}
prop-types@15.8.1:

View File

@@ -86,9 +86,7 @@ const InnerConnectionDetail = ({ data, onClose }: InnerProps) => {
{ label: t("Rule"), value: rule },
{
label: t("Process"),
value: `${metadata.process}${
metadata.processPath ? `(${metadata.processPath})` : ""
}`,
value: `${metadata.process}${metadata.processPath ? `(${metadata.processPath})` : ""}`,
},
{ label: t("Time"), value: dayjs(data.start).fromNow() },
{

View File

@@ -59,7 +59,9 @@ export const ProfileItem = (props: Props) => {
transform,
transition,
isDragging,
} = useSortable({ id: props.id });
} = useSortable({
id: props.id,
});
const { t } = useTranslation();
const [anchorEl, setAnchorEl] = useState<any>(null);

View File

@@ -30,7 +30,9 @@ export const TestItem = (props: Props) => {
transform,
transition,
isDragging,
} = useSortable({ id: props.id });
} = useSortable({
id: props.id,
});
const { t } = useTranslation();
const [anchorEl, setAnchorEl] = useState<any>(null);

View File

@@ -48,7 +48,10 @@ export function useServiceInstaller() {
"error",
t(
"Failed to check service status, retrying attempt {count}/{total}...",
{ count: i + 1, total: 5 },
{
count: i + 1,
total: 5,
},
),
);
}