neoformat icon indicating copy to clipboard operation
neoformat copied to clipboard

formatting .tsx (typescriptreact filetype) with prettier does not work

Open alk-mandrianarijaona opened this issue 2 years ago • 0 comments

When working on file with extension .tsx, user should be able to format the buffer. Currently, the formatting is not working for this file type Typescript react.

To reproduce, clone an example project https://github.com/bahmutov/prettier-config-example. Create a file with extension .tsx (in folder ProjectA on the sample project) and add some content that need formatting :

const o =      {
    name: "Gleb",
    age: 39,
    hacker: true,
    twitter: "@bahmutov",
    site: "https://gleb.dev"
};

Call :Neoformat prettier, a message is displayed: Neoformat: no change necessary. If neoformat verbose mode is enabled, and additional information is given Neoformat: executable: prettier is not an executable. On other files with extension js or ts, the formatter works just fine.

alk-mandrianarijaona avatar Apr 07 '22 07:04 alk-mandrianarijaona