Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier with spacemacs and js files. #46

Open
cinjon opened this issue Nov 1, 2018 · 0 comments
Open

Prettier with spacemacs and js files. #46

cinjon opened this issue Nov 1, 2018 · 0 comments

Comments

@cinjon
Copy link

cinjon commented Nov 1, 2018

Hi, I am trying to use prettier with spacemacs and .js files that have jsx blocks in them. Notably, if I change the extension to .jsx, then it is applying Prettier (and is notifying me as such with the "Prettier" tag on the bottom of the screen). However, it is not applying to jsx blocks in .js files. How do I fix this? In my user-config, I have this:

(add-hook 'js2-mode-hook 'prettier-js-mode)
(add-hook 'js2-jsx-mode-hook 'prettier-js-mode)
(add-hook 'web-mode-hook 'prettier-js-mode)
(add-hook 'react-mode-hook 'prettier-js-mode)
(push '("\\.js\\'" . react-mode) auto-mode-alist)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant