Hi! I just upgraded prettier-atom to v0.55.0 and prettier to v1.14.2. It seems that prettier-atom no longer reads the configuration options from .prettierrc.
I have this in my project root folder in file .prettierrc:
{
"singleQuote": true
}
And when I run Prettier: Format on a file in:
cypress/integration/inquiries/from-list.spec.js
With this content:
import { foo } from './bar';
prettier-atom incorrectly changes that code to this:
import { foo } from "./bar";
When I run prettier via CLI, the singleQuote option is taken into account and the original version is kept as-is:
node_modules/.bin/prettier --write cypress/integration/inquiries/from-list.spec.js
The cypress directory tree looks like this currently:
โโโ integration
โย ย โโโ communications
โย ย โย ย โโโ inquiries
โย ย โย ย โโโ index.spec.js
โย ย โโโ inquiries
โย ย โย ย โโโ from-list.spec.js
โย ย โโโ rails.helper.js
โย ย โโโ smoke-test.spec.js
โโโ plugins
โย ย โโโ index.js
โโโ support
โโโ commands.js
โโโ i18n.js
โโโ index.js
โโโ railsCleanup.js
There's no package.json or anything of that sort that might affect the prettier configuration lookup as much as I know.
When I tried this same thing with v0.54.0:
apm install [email protected]
...the singleQuote option in .prettierrc was working as expected.
Let me know if you need any further debug help here.
Output of Prettier: Debug:
Atom version: 1.29.0
prettier-atom version: 0.55.0
prettier: bundled
prettier version: 1.13.4
prettier-eslint version: 8.8.2
prettier-atom configuration: {
"formatOnSaveOptions": {
"enabled": true,
"isDisabledIfNoConfigFile": true,
"isDisabledIfNotInPackageJson": true,
"showInStatusBar": true,
"respectEslintignore": true,
"excludedGlobs": [],
"whitelistedGlobs": []
},
"silenceErrors": true,
"useEditorConfig": false,
"useEslint": false,
"useStylelint": false,
"prettierEslintOptions": {
"prettierLast": false
}
}
Sorry about this, I'm releasing a hotfix now.
Wow, thanks for the quick turn-around! ๐
Man, this drove me crazy. Hoped I had looked up for this issue earlier yesterday ;-)
Slightly offtopic, but damn, that's how you properly report an issue. ๐
Most helpful comment
Sorry about this, I'm releasing a hotfix now.