Skip to content

Commit

Permalink
chore: tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Jun 5, 2023
1 parent 8562a00 commit 773ecec
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 6 deletions.
16 changes: 13 additions & 3 deletions src/GZCTF/ClientApp/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
{
"env": {
"browser": true,
"es2020": true
},
"extends": [
"eslint:recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"react-hooks/exhaustive-deps": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
"@typescript-eslint/no-explicit-any": "off"
"@typescript-eslint/no-non-null-asserted-optional-chain": "off"
},
"parser": "@typescript-eslint/parser"
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
}
}
2 changes: 2 additions & 0 deletions src/GZCTF/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"scripts": {
"dev": "vite",
"lint": "eslint --ext .ts,.tsx src",
"build": "tsc && vite build",
"preview": "vite preview",
"prettier": "prettier --write src",
Expand Down Expand Up @@ -58,6 +59,7 @@
"axios": "^1.4.0",
"babel-plugin-prismjs": "^2.1.0",
"eslint": "8.42.0",
"eslint-plugin-react-hooks": "^4.6.0",
"form-data": "~4.0.0",
"lodash": "^4.17.21",
"prettier": "~2.8.8",
Expand Down
12 changes: 12 additions & 0 deletions src/GZCTF/ClientApp/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions src/GZCTF/ClientApp/src/components/admin/BloodBonusModel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ const BloodBonusModel: FC<ModalProps> = (props) => {
max={100}
disabled={disabled}
value={firstBloodBonus / 10}
onChange={(value) => typeof value === "number" && setFirstBloodBonus(Math.floor(value * 10))}
onChange={(value) =>
typeof value === 'number' && setFirstBloodBonus(Math.floor(value * 10))
}
/>
<NumberInput
label="二血奖励 (%)"
Expand All @@ -70,7 +72,9 @@ const BloodBonusModel: FC<ModalProps> = (props) => {
max={100}
disabled={disabled}
value={secondBloodBonus / 10}
onChange={(value) => typeof value === "number" && setSecondBloodBonus(Math.floor(value * 10))}
onChange={(value) =>
typeof value === 'number' && setSecondBloodBonus(Math.floor(value * 10))
}
/>
<NumberInput
label="三血奖励 (%)"
Expand All @@ -81,7 +85,9 @@ const BloodBonusModel: FC<ModalProps> = (props) => {
max={100}
disabled={disabled}
value={thirdBloodBonus / 10}
onChange={(value) => typeof value === "number" && setThirdBloodBonus(Math.floor(value * 10))}
onChange={(value) =>
typeof value === 'number' && setThirdBloodBonus(Math.floor(value * 10))
}
/>
<Group grow m="auto" w="100%">
<Button fullWidth disabled={disabled} onClick={onUpdate}>
Expand Down

0 comments on commit 773ecec

Please sign in to comment.