Closed
Description
Describe the bug
- Our code base has suffered over the years because contributors ignored linting errors
- We created a
eslint_disable_check.py
script to detect the use of theeslint-disable
string in files submitted in the PR - NOTE: The script must fail when:
- any of the many variants of
eslint-disable
are discovered - any future variants of
eslint-disable
are created
- any of the many variants of
- In other words when any of these are discovered at the beginning of any line after stripping white space at the ends and duplicate within multiple white space
// eslint-disable
/* eslint-disable
- Your solution must cover any of the options found on the official eslint page
- Take inspiration from the work done here
- The previous attempt failed at doing this.
To Reproduce
Steps to reproduce the behavior:
- Submit a PR
- Make one of the files have the following line in it (THIS IS AN EXAMPLE OF ONE OF MANY POSSIBLE FAILURE SCENARIOS)
// eslint-disable-next-line @typescript-eslint/no-unused-vars
- The PR does not fail
Expected behavior
- Submit a PR
- Make one of the files have the following line in it
// eslint-disable-next-line @typescript-eslint/no-unused-vars
- The PR must fail
Actual behavior
- See above
Screenshots
- N/A
Additional details
The same person should be assigned to both these issues
- API: Fix the
eslint_disable_check.py
script talawa-api#2519 - ADMIN: Fix the
eslint_disable_check.py
script #2257
Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship