title: Run prettier from CLI with config in package.json
body: <p>I'm trying to run Prettier from CLI defining the config in the package.json file as it's explained in Offical Docs</p>
  
  <blockquote>
    <p>Prettier uses cosmiconfig for configuration file support. This means
    you can configure prettier via (in order of precedence):</p>
    
    <p>A "prettier" key in your package.json file.</p>
  </blockquote>
  
  <p>Howewer, using the following command and the folling package.json file, I get the shown error:</p>
  
  <p><strong>Command:</strong></p>
  
  <pre><code>prettier --config package.json ./src/basic-sample.js
  </code></pre>
  
  <p><strong>package.json:</strong></p>
  
  <pre><code>{
      "name": "prettier-getting-started",
      "version": "1.0.0",
      "description": "Prettier - Getting started",
      "main": "index.js",
      "scripts": {
          "test": "echo \"Error: no test specified\" &amp;&amp; exit 1",
      },
      "keywords": [
          "prettier"
      ],
      "author": "Rafa Romero",
      "license": "ISC",
      "devDependencies": {
          "prettier": "2.0.4"
      },
      "prettier":{
          "singleQuote": true
        }
  }
  </code></pre>
  
  <p><strong>Result:</strong></p>
  
  <pre><code>[error] Invalid configuration file `src/basic-sample.js`: JSON Error in /Users/rafaromero/prettier-sample/package.json:
  [error] LinesAndColumns$1 is not a constructor
  </code></pre>
  
  <p>I would like to note that if a use a <em>.prettierrc.js</em> file with the same command it works</p>