0

prettier-atom was working great with .js files, but after running it on a package.json file (auto-format on save was enabled) it stopped working and gave me the following error:

"prettier-atom failed: Invalid singleQuote value. Expected true or false, but received "true" "

prettier-atom error

I tried to change my .prettierrc from

"singleQuote": true,

to

"singleQuote": false,

but I don't know where to do this. There are 31 different .prettierrc files on my (Windows) system and I don't know which one to change, nor do I know if the change will fix the error. I have re-started atom but no luck.

I will add *.json to configuration overrides, but I still don't know how to "clear" the error.

Steve Silberberg
  • 277
  • 3
  • 18

1 Answers1

0

OK, I figured it out. I was going to delete the entire thread but this may help someone else.

  1. To configure prettier, I blew off .prettierrc and just updated package.json
  2. I changed the prettier object member from

    "prettier": { "singleQuote": "true" },

to

  "prettier": {
    "singleQuote": true
  },

Sorry to waste your time but I assure you that I wasted a lot more time than you may have on this.

Steve Silberberg
  • 277
  • 3
  • 18
  • we do have `jsxSingleQuote` here in [prettier defined options](https://prettier.io/docs/en/options.html#jsx-quotes) – imran haider May 17 '20 at 02:31