From 2828edd6b737ed028480dea8c8a4de28806a472e Mon Sep 17 00:00:00 2001 From: voldemort <5692900+yell0wsuit@users.noreply.github.com> Date: Tue, 22 Jul 2025 17:45:48 +0700 Subject: [PATCH] add prettier formatting --- cdrm-frontend/.gitignore | 1 + cdrm-frontend/.prettierignore | 5 + cdrm-frontend/.prettierrc.json | 8 + cdrm-frontend/eslint.config.js | 57 +- cdrm-frontend/index.html | 36 +- cdrm-frontend/package-lock.json | 7439 +++++++++-------- cdrm-frontend/package.json | 62 +- cdrm-frontend/src/App.jsx | 54 +- .../components/Functions/ParseChallenge.jsx | 70 +- cdrm-frontend/src/components/NavBar.jsx | 72 +- cdrm-frontend/src/components/NavBarMain.jsx | 28 +- cdrm-frontend/src/components/Pages/API.jsx | 194 +- .../src/components/Pages/Account.jsx | 54 +- cdrm-frontend/src/components/Pages/Cache.jsx | 22 +- .../src/components/Pages/HomePage.jsx | 490 +- .../src/components/Pages/MyAccount.jsx | 501 +- .../src/components/Pages/Register.jsx | 210 +- .../src/components/Pages/TestPlayer.jsx | 282 +- cdrm-frontend/src/components/SideMenu.jsx | 344 +- cdrm-frontend/src/index.css | 12 +- cdrm-frontend/src/main.jsx | 24 +- cdrm-frontend/vite.config.js | 10 +- 22 files changed, 5069 insertions(+), 4906 deletions(-) create mode 100644 cdrm-frontend/.prettierignore create mode 100644 cdrm-frontend/.prettierrc.json diff --git a/cdrm-frontend/.gitignore b/cdrm-frontend/.gitignore index 251ce6d..678e483 100644 --- a/cdrm-frontend/.gitignore +++ b/cdrm-frontend/.gitignore @@ -10,6 +10,7 @@ lerna-debug.log* node_modules dist-ssr *.local +dist # Editor directories and files .vscode/* diff --git a/cdrm-frontend/.prettierignore b/cdrm-frontend/.prettierignore new file mode 100644 index 0000000..e54174c --- /dev/null +++ b/cdrm-frontend/.prettierignore @@ -0,0 +1,5 @@ +dist/ +node_modules/ +src/assets/icons/ +src/components/Functions/protobuf.min.js +src/components/Functions/license_protocol.min.js diff --git a/cdrm-frontend/.prettierrc.json b/cdrm-frontend/.prettierrc.json new file mode 100644 index 0000000..eb0d496 --- /dev/null +++ b/cdrm-frontend/.prettierrc.json @@ -0,0 +1,8 @@ +{ + "trailingComma": "es5", + "tabWidth": 4, + "semi": true, + "singleQuote": false, + "useTabs": false, + "printWidth": 100 +} diff --git a/cdrm-frontend/eslint.config.js b/cdrm-frontend/eslint.config.js index ec2b712..ab358f6 100644 --- a/cdrm-frontend/eslint.config.js +++ b/cdrm-frontend/eslint.config.js @@ -1,33 +1,30 @@ -import js from '@eslint/js' -import globals from 'globals' -import reactHooks from 'eslint-plugin-react-hooks' -import reactRefresh from 'eslint-plugin-react-refresh' +import js from "@eslint/js"; +import globals from "globals"; +import reactHooks from "eslint-plugin-react-hooks"; +import reactRefresh from "eslint-plugin-react-refresh"; export default [ - { ignores: ['dist'] }, - { - files: ['**/*.{js,jsx}'], - languageOptions: { - ecmaVersion: 2020, - globals: globals.browser, - parserOptions: { - ecmaVersion: 'latest', - ecmaFeatures: { jsx: true }, - sourceType: 'module', - }, + { ignores: ["dist"] }, + { + files: ["**/*.{js,jsx}"], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + parserOptions: { + ecmaVersion: "latest", + ecmaFeatures: { jsx: true }, + sourceType: "module", + }, + }, + plugins: { + "react-hooks": reactHooks, + "react-refresh": reactRefresh, + }, + rules: { + ...js.configs.recommended.rules, + ...reactHooks.configs.recommended.rules, + "no-unused-vars": ["error", { varsIgnorePattern: "^[A-Z_]" }], + "react-refresh/only-export-components": ["warn", { allowConstantExport: true }], + }, }, - plugins: { - 'react-hooks': reactHooks, - 'react-refresh': reactRefresh, - }, - rules: { - ...js.configs.recommended.rules, - ...reactHooks.configs.recommended.rules, - 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], - 'react-refresh/only-export-components': [ - 'warn', - { allowConstantExport: true }, - ], - }, - }, -] +]; diff --git a/cdrm-frontend/index.html b/cdrm-frontend/index.html index 692cbfd..e21afbe 100644 --- a/cdrm-frontend/index.html +++ b/cdrm-frontend/index.html @@ -1,20 +1,20 @@ -
- - - - - - - - - - -