karlhadwen/eslint-prettier-airbnb-react

Changing settings via the .prettierrc.json file does not work

isheebo opened this issue · 3 comments

Running the command given in the README file, generates this .prettierrc file

{
  "printWidth": 100,
  "singleQuote": true,
  "trailingComma": "none"
}

This includes the printWidth that was set during the setup procedure (100) as the maximum line length. However, this does not limit the line length to 100 characters. It instead limits them to 80 characters. I also observed a similar issue with the singleQuotes setting. Turning it off,singleQuotes: false, will not work and on saving the file, it will still permit single quotes within the current file.

This may be due to the fact that there are already enforced restrictions in the generated .eslintrc. Something like :-

    "quotes": [
      2,
      "single",
      {
        "avoidEscape": true,
        "allowTemplateLiterals": true
      }
    ],

I believe doing it this way would make the prettierrc file redundant for the most part.

Hey @isheebo, I think you're right. The prettier.rc is not longer needed. I've been having this issue for a while and I'm yet to fix it, so thank you for raising it. I'll implement a fix shortly! Thanks for finally nuding me to finally do it!

Should be fixed. Let me know if all is okay!

This works fine. Thank you