This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
Add eslint-plugin-eslint-comments to prevent accidentally leaving disabled rules for entire files #901
Labels
💻 aspect: code
Concerns the software code in the repository
✨ goal: improvement
Improvement to an existing user-facing feature
🟩 priority: low
Low priority and doesn't need to be rushed
Problem
Some ESlint rules can be disabled in block comments for specific parts of a file, we use this for disabled some texts that should not be translated for example. The problem is that this approach is prone to forgetting to close the exception as happened in the
VImageDetails
component.openverse-frontend/src/components/VImageDetails/VImageDetails.vue
Lines 41 to 50 in 8e50891
Description
Adding eslint-plugin-eslint-comments can help offload this burden from the developer who writes the exception comment as well as those who review the changes.
Alternatives
Be aware in code reviews that ESlint comments are not applied without their corresponding closure.
Additional context
Recommended in #898 by @sarayourfriend.
Implementation
The text was updated successfully, but these errors were encountered: