Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 46 commits into
base: main
Choose a base branch
from

Conversation

chillkang
Copy link
Contributor

@chillkang chillkang commented Jul 16, 2024

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
  • No testing required (explain why): Linter configuration files and new scripts were added.

Issue / Card

Fixes #https://warthogs.atlassian.net/browse/WD-12366

@webteam-app
Copy link

@chillkang chillkang changed the title chore: install eslint-plugin-jsx-a11y as a development dependency chore: integrate eslint-plugin-jsx-a11y into the existing ESLint setup Jul 16, 2024
Copy link

codecov bot commented Jul 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.71%. Comparing base (b8b6b55) to head (c1c94b9).
Report is 121 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4764      +/-   ##
==========================================
- Coverage   66.80%   62.71%   -4.09%     
==========================================
  Files         113      160      +47     
  Lines        3714     4144     +430     
  Branches      965      639     -326     
==========================================
+ Hits         2481     2599     +118     
- Misses       1098     1357     +259     
- Partials      135      188      +53     

see 115 files with indirect coverage changes

chillkang and others added 22 commits August 8, 2024 17:59
…ublic

chore: fix lint errors in static/js/public
…dstore

chore: fix lint errors in static/js/brandstore
…rs-in-brandstore

chore: fix remaining lint errors in brandstore
…rs-in-static/js/libs

chore: fix remaining lint errors in static/js/libs
…-integrate-eslint-plugin-jsx-ally-into-js-lint-configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants