prettier / prettier-eslint-cli

CLI for prettier-eslint
https://npm.im/prettier-eslint-cli
MIT License
539 stars 85 forks source link

`--list-different` from script fails #421

Closed runely closed 2 years ago

runely commented 3 years ago

Relevant code/config.

extends: ['eslint:recommended'],
  parserOptions: {
    ecmaVersion: 6
  },
  env: {
    node: true
  },
  settings: {
    jest: {
      version: 26
    }
  },
  rules: {
    quotes: [
      'error',
      'single',
      {
        avoidEscape: true
      }
    ],
    semi: [
      2,
      'never'
    ]
  }

npm script

"scripts": {
    "lint": "prettier-eslint --list-different **/*.js"
  }

What you did: npm run lint

What happened: Fails with error Cannot read property 'match' of undefined

image

Problem description: prettier-eslint --list-different fails with error Cannot read property 'match' of undefined

JounQin commented 2 years ago

PR welcome to fix this issue.

And also please read https://antfu.me/posts/why-reproductions-are-required