prettier / prettier-emacs

Minor mode to format JS code on file save

Home Page:http://jlongster.com/A-Prettier-Formatter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using eslint_d to do the same as this package

DamienCassou opened this issue · comments

To automatically format on save your JS buffer using prettier syntax, you can:

  1. Install and configure eslint if you haven't done so already
  2. Add eslint-plugin-prettier and eslint-config-prettier to your package.json
  3. Add "eslint:recommended" and "plugin:prettier/recommended" to your eslint "extends" configuration
  4. Add "prettier" to your eslint "plugins" configuration
  5. Install and activate eslintd-fix for Emacs
  6. Turn on eslintd-fix-mode in your JS files