Prettier-atom: format on save doesn't work

Created on 10 Jul 2017  路  8Comments  路  Source: prettier/prettier-atom

format on save doesn't work for me

```
Atom version: 1.18.0
prettier-atom version: 0.36.1
prettier version: 1.5.2
prettier-eslint version: 6.4.2
prettier-atom configuration: {
"formatOnSaveOptions": {
"enabled": true,
"respectEslintignore": false,
"showInStatusBar": false,
"javascriptScopes": [
"source.js",
"source.jsx",
"source.js.jsx",
"source.babel",
"source.js-semantic",
"text.html.basic",
"text.html.vue"
],
"typescriptScopes": [
"source.ts",
"source.tsx",
"source.ts.tsx"
],
"cssScopes": [
"source.css",
"source.less",
"source.css.less",
"source.scss",
"source.css.scss"
],
"jsonScopes": [
"source.json"
],
"excludedGlobs": [],
"whitelistedGlobs": [],
"isDisabledIfNotInPackageJson": false
},
"prettierEslintOptions": {
"prettierLast": false
},
"prettierOptions": {
"jsxBracketSameLine": true,
"parser": "flow",
"singleQuote": true,
"bracketSpacing": true,
"semi": true,
"useTabs": false,
"printWidth": 80,
"tabWidth": "auto",
"trailingComma": "none"
},
"useEditorConfig": false,
"useEslint": false
}

invalid

Most helpful comment

Same here - the problem for me was not adding prettier-eslint on devDependencies when having ESLint integration ON.

All 8 comments

Can you provide some more details?

Hi @robwise I've also observed this bug introduced in either 0.36.0 or 0.36.1 (I think). Here are some screen caps of the behavior with 0.36.1 installed:

Formatting manually (^鈱) some test JSX (formats correctly) -

Saving and expecting format on save -

after reinstall prettier-atom, disable linter-eslint's fix on save and enable linter-eslint's fix on save, now it works fine magically

I am going to close this for now, please let me know if there is still something that needs to be addressed and I will reopen.

It doesn't work for me too, this should be reopen, I tried to reinstall prettier-atom, disable eslint auto save, re-enable the prettier format on save settings but still doesn't work...

Update: After installing prettier-eslint as a devdependencies the Format on save settings start to work.

Do you need me to reopen? I need help finding where the bug is or how to reproduce as most people aren't running into this it seems.

Same here - the problem for me was not adding prettier-eslint on devDependencies when having ESLint integration ON.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zimme picture zimme  路  6Comments

kentcdodds picture kentcdodds  路  5Comments

tleunen picture tleunen  路  7Comments

mxstbr picture mxstbr  路  5Comments

jonyyz picture jonyyz  路  6Comments