prettier/prettier-eslint

no-console will not throw error, but just nothing...

JackieLs opened this issue · 1 comments

Versions:

  • prettier-eslint version: 9.0.2
  • node version: 14.17.0
  • npm (or yarn) version: 6.14.13

English not good

In eslint rules, the property fixable of no-console is undefined.
The function getRelevantESLintConfig in prettier-eslint/src/utils.js

....
if (loadedRules.has(name)) {
  const {
    meta: { fixable }
  } = loadedRules.get(name);

  if (!fixable) {
    logger.trace('turing off rule:', JSON.stringify({ [name]: rule }));
    rule = ['off'];
  }
}
...

I think the realization changing 'error' to 'off' is not very good.
Although it's unfixable, but eslint will hint the error, but prettier-eslint not.

I would like commit one pr.

Duplicate of #704 and PR welcome