If you are on bash you can do this in the command line using touch. prettierrc in the root of your project directory if you have Prettier installed in your project or in your home directory if it's installed globally. prettierrc file and add your setting.Ĭreate your. To tell Prettier how you want it to format your code, you will need to make a. AH! You will need to tell Prettier how you want it to format your code to fix this. Now you should have Prettier working! Go to a JavaScript file and use the command shortcut to run Prettier on your file Ctrl + Alt + Shift + P PC or Cmd + Alt + Shift + p for macOS.īUT WAIT! If you have ESLint in your project, you might notice the Prettier is formatting everything against your rules. In the screen capture below, you can see a selection for the globally installed version of Prettier for my selected node version and the one local to my project RubyMine will go and find Prettier, and you just have to make sure the correct one is selected. Here you will select the global or local version of Prettier to was installed. There will be two drop-down fields, one for selecting the version of node your project is using, another for selecting where Prettier is. Go to Preferences > Language & Frameworks > Prettier. Next, you need to go back to RubyMine so you can tell it where Prettier is. Sweet, now you need to tell RubyMine where to find Prettier. Don't fret it's easy enough to install it globally and have RubyMine use it just fine. In certain situations, you might want to have Prettier installed globally or cant install Prettier on a project you are working with.
0 Comments
Leave a Reply. |