snapcraft.io
snapcraft.io copied to clipboard
chore: integrate eslint-plugin-jsx-a11y into the existing ESLint setup
Done
- Install the
eslint-plugin-jsx-a11y
and createeslint-a11y.config.js
file separately from.eslintrc.js
Reference: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y - Add
lint-a11y
script topackage.json
andgithub actions workflow
- Include file extensions,
.jsx
,.ts
, and.tsx
tolint-js
andlint-a11y
scripts
How to QA
-
lint-js
andlint-a11y
checks should be failing now since new file extensions,.jsx
,.ts
, and.tsx
, were added. Before, we only got errors from.js
files.
Ideas for the next steps?
- Fixing the errors automatically besides manual fix
1-1. Run ESLint with the
--fix
option 1-2. Update configurations, e.g., useprettier
alongside to fix style and formatting issues and disable the rule"rules": { "prettier/prettier": "error", "react/react-in-jsx-scope": "off" },
Testing
- [ ] This PR has tests
- [x] No testing required (explain why): Linter configuration files and new scripts were added.
Issue / Card
Fixes #https://warthogs.atlassian.net/browse/WD-12366