The package seems to complain with an error that says:
prettier-atom failed: unknown type: "TSJSDocAllType"
This happens when you try to run Prettier: Format on a file that uses the flow existential type * with generics. The code works fine in Prettier playground.
Hello.js/**
* @flow
*/
import React, { Component } from 'react'
class Hello extends Component<*> {
render() {
return (
<div>Hello</div>
)
}
}
export default Hello
Prettier: Format This will throw the error.
Atom version: 1.24.0
prettier-atom version: 0.51.0
prettier version: 1.10.2
prettier-eslint version: 8.8.1
prettier-atom configuration: {
"prettierOptions": {
"bracketSpacing": false,
"parser": "flow",
"semi": false,
"singleQuote": false,
"useTabs": false,
"jsxBracketSameLine": false,
"printWidth": 80,
"tabWidth": "auto",
"trailingComma": "none",
"arrowParens": "avoid"
},
"useEslint": false,
"useStylelint": false,
"useEditorConfig": true,
"formatOnSaveOptions": {
"enabled": false,
"respectEslintignore": true,
"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",
"source.css.postcss"
],
"jsonScopes": [
"source.json"
],
"graphQlScopes": [
"source.graphql"
],
"markdownScopes": [
"source.md",
"source.gfm",
"text.md"
],
"vueScopes": [
"text.html.vue"
],
"excludedGlobs": [],
"whitelistedGlobs": [],
"isDisabledIfNotInPackageJson": false,
"isDisabledIfNoConfigFile": false
},
"prettierEslintOptions": {
"prettierLast": false
}
}
You all have done an awesome job with this package, thanks so much!
@saadq I'm able to format this with prettier-atom just fine and I use flow (and existential types) a lot.

Do you think this might be repo-specific somehow? What version of prettier do you have installed locally? Or are you using the version that comes bundled with prettier-atom?
Oh, weird. I have version ^1.10.2 listed in my dev dependencies. I'm going to see if I can create a minimal repo which reproduces the problem.
Ahh, so sorry guys. I had "parser": "typescript" in my .prettierrc since I was trying it out for a bit, and forgot to switch it back to Flow. Everything is working as it should once I put it back to "flow", my apologies! Thanks for the quick reply :)
Most helpful comment
Ahh, so sorry guys. I had
"parser": "typescript"in my.prettierrcsince I was trying it out for a bit, and forgot to switch it back to Flow. Everything is working as it should once I put it back to"flow", my apologies! Thanks for the quick reply :)