Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prettier-plugin-eex

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-eex

Prettier plugin for .html.eex and .html.leex files

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
88
increased by83.33%
Maintainers
1
Weekly downloads
 
Created
Source

Prettier EEX Plugin

How to install?

  yarn add -D prettier prettier-plugin-eex

Config options

  • printWidth - used by Prettier directly
  • eexMultilineNoParens - Array - used to format multiline expressions, provide which functions shouldn't wrap parens around arguments
  • eexMultilineLineLength - Number - used to format multiline expressions

Example:

  {
    "printWidth": 130,
    "eexMultilineLineLength": 100,
    "eexMultilineNoParens": [
      "link",
      "form_for"
    ]
  }

How to install in Phoenix project?

Add .prettierignore file with:

deps/
_build/
.elixir_ls
assets
priv

And .prettierrc.js

module.exports = {
  printWidth: 120,
};
cd assets
yarn add -D prettier prettier-plugin-eex

How to use?

Add to mix.exs aliases and use as mix prettier

defp aliases do
  [...
    prettier: "cmd ./assets/node_modules/.bin/prettier --check . --color"
  ]
end

How to make it work with Prettier Visual Studio code extension?

It's important to add node modules path.

"prettier.prettierPath": "./assets/node_modules/prettier"

How to deal with bugs?

Your code wasn't formatted correctly or there was an error? Add the problematic file to .prettierignore and submit an Issue.

Keywords

FAQs

Package last updated on 07 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc