fluid-project / fluid-lint-all

Consolidated linting logic free from any particular build technology
BSD 3-Clause "New" or "Revised" License
0 stars 5 forks source link

Disabling json5lint, mdjsonlint, #9

Closed jobara closed 3 years ago

jobara commented 3 years ago

Describe the bug

Disabling json5lint, mdjsonlint, or stylelint throws the error Cannot read property 'includes' of undefined.

The errors come from the related runChecks function related to

if (that.options.config.enabled && !checksToRun || checksToRun.includes(that.options.key)) {

To reproduce

Steps to reproduce the behavior:

  1. In .fluidlintallrc.json disable any or all of the above mentioned checks
  2. Run npm run lint
  3. Notice that an error is thrown.

Expected behavior

The linting should skip the disabled checks.

Technical details

Desktop

the-t-in-rtf commented 3 years ago

The checks needed parentheses, as in "the check must be enabled" AND "one of these two things must be true". Fixing it up now.