-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Framework: Define all ESLint rules as errors #8562
Comments
Some rules still need fixing, so I believe this is still relevant as a placeholder. It is a good time to re-purpose the goal and change the title and description, though. One thing I'd like us to do is using ESLint at its full potential: making use of its I'd suggest focusing the efforts of this task in solving the fixable rules first. From that on, my understanding is that we can have ESLint always activated. These are the fixable rules in
@aduth what do you think? |
@nosolosw This sounds like a good idea. How do you suggest a person generate a report to tell them which files are problematic? Running the raw |
How about creating |
This issue has been marked as stale because it hasn't been updated in a while. It will be closed in a week. |
We use ESLint to enforce a consistent code standard. Over time, we have changed and added rules to our configuration. In doing so, because legacy code often violated the latest configuration settings, they could not be set to throw errors during continuous integration. As background, ESLint allows you to configure a rule with as a warning (1) or error (2), the latter being of higher severity and failing the continuous integration build. Enforcing our configuration during the continuous integration build step (and pre-commit hooks) helps highlight issues programmatically rather than through human intervention (i.e. peer review).
For this reason, we should seek to upgrade all rules in our ESLint configuration to be defined as errors. Because we extend the
eslint-config-wpcalypso
shared configuration, the process for doing this is to simply remove our warning overrides from the configuration. As such, rules defined as warnings in our ESLint configuration should effectively serve as a checklist of remaining items to be resolved in the codebase.The text was updated successfully, but these errors were encountered: