snapcraft.io icon indicating copy to clipboard operation
snapcraft.io copied to clipboard

chore: integrate eslint-plugin-jsx-a11y into the existing ESLint setup

Open chillkang opened this issue 7 months ago • 2 comments

Done

  • Install the eslint-plugin-jsx-a11y and create eslint-a11y.config.js file separately from .eslintrc.js Reference: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y
  • Add lint-a11y script to package.json and github actions workflow
  • Include file extensions, .jsx, .ts, and .tsx to lint-js and lint-a11y scripts

How to QA

  • lint-js and lint-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?

  1. Fixing the errors automatically besides manual fix 1-1. Run ESLint with the --fix option 1-2. Update configurations, e.g., use prettier 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

chillkang avatar Jul 16 '24 16:07 chillkang