From 6c9f2547cc7e72e6a3a4d912bf5214d419c394c3 Mon Sep 17 00:00:00 2001 From: Hydra Date: Mon, 13 May 2024 02:33:10 +0100 Subject: [PATCH] ci: adding a11y plugin to eslint --- .eslintrc.cjs | 1 + package.json | 1 + .../components/bottom-panel/bottom-panel.tsx | 2 +- .../checkbox-field/checkbox-field.tsx | 2 +- src/renderer/src/components/modal/modal.tsx | 4 +- .../src/components/text-field/text-field.tsx | 4 +- .../src/pages/game-details/game-details.tsx | 1 + yarn.lock | 72 ++++++++++++++++++- 8 files changed, 80 insertions(+), 7 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 49aa25e2..564daa84 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -4,6 +4,7 @@ module.exports = { "plugin:react/recommended", "plugin:react/jsx-runtime", "plugin:react-hooks/recommended", + "plugin:jsx-a11y/recommended", "@electron-toolkit/eslint-config-ts/recommended", "prettier", ], diff --git a/package.json b/package.json index 5830a320..85043c80 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "electron-builder": "^24.9.1", "electron-vite": "^2.0.0", "eslint": "^8.56.0", + "eslint-plugin-jsx-a11y": "^6.8.0", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "husky": "^9.0.11", diff --git a/src/renderer/src/components/bottom-panel/bottom-panel.tsx b/src/renderer/src/components/bottom-panel/bottom-panel.tsx index 6cce070e..44d125cd 100644 --- a/src/renderer/src/components/bottom-panel/bottom-panel.tsx +++ b/src/renderer/src/components/bottom-panel/bottom-panel.tsx @@ -64,7 +64,7 @@ export function BottomPanel() { {status} - + v{version} "{VERSION_CODENAME}" diff --git a/src/renderer/src/components/checkbox-field/checkbox-field.tsx b/src/renderer/src/components/checkbox-field/checkbox-field.tsx index 9a7e71d5..bb81a910 100644 --- a/src/renderer/src/components/checkbox-field/checkbox-field.tsx +++ b/src/renderer/src/components/checkbox-field/checkbox-field.tsx @@ -24,7 +24,7 @@ export function CheckboxField({ label, ...props }: CheckboxFieldProps) { /> {props.checked && } -