ESLINT с опцией --fix не исправляет мои файлы js - PullRequest
0 голосов
/ 22 ноября 2018

Моя конфигурация eslint проста, как эта

{
  "extends": "airbnb-base",
  "env": {
    "browser": true,
    "es6": true,
    "jquery": true
  },
  "plugins": [
    "ejs"
  ]
}

, когда я запускаю

eslint app.js 

, вывод:

  162:110  error    A space is required after ','                                                                  comma-spacing
  167:1    error    Expected indentation of 2 spaces but found 4                                                   indent
  168:1    error    Expected indentation of 4 spaces but found 8                                                   indent
  169:1    error    Expected indentation of 4 spaces but found 8                                                   indent
  170:1    error    Expected indentation of 2 spaces but found 4                                                   indent
  171:1    error    Expected indentation of 4 spaces but found 8                                                   indent
  171:9    warning  Unexpected console statement                                                                   no-console
  172:1    error    Expected indentation of 4 spaces but found 8                                                   indent
  173:1    error    Expected indentation of 6 spaces but found 12                                                  indent
  174:1    error    Expected indentation of 6 spaces but found 12                                                  indent
  175:1    error    Expected indentation of 4 spaces but found 8                                                   indent
  176:11   error    Expected indentation of 2 spaces but found 4                                                   indent

✖ 131 problems (116 errors, 15 warnings)
  102 errors and 0 warnings potentially fixable with the `--fix` option.

Это говорит о том, что 102 ошибкиисправляется с помощью --fix, но когда я запускаю с eslint app.js --fix, это ничего не исправляет.Это показывает тот же результат.Почему --fix не может ничего исправить?

ОБНОВЛЕНИЕ

Когда я удалил ejs из плагинов, он работает нормально.Но тем не менее, не понимаю, что является основной причиной этой проблемы.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...