New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ember-template-lint-plugin-prettier

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-template-lint-plugin-prettier

A prettier plugin for ember-template-lint

  • 1.0.0-beta.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10K
decreased by-24.84%
Maintainers
1
Weekly downloads
 
Created
Source

ember-template-lint-plugin-prettier 👋

A prettier plugin for ember-template-lint

It runs Prettier as a rule. Then it reports differences as individual ember-template-lint issues.

Install

yarn add -D prettier ember-template-lint-plugin-prettier

The project's Prettier version will then be used by the prettier rule.

Note that prettier and (of course) ember-template-lint are required as peerDependencies of this package.

Also, this plugin don't provide a recommended set of rules (that you often provide in the extends config key). You'll have to enable them manually (see Usage).

Usage

module.exports = {
  extends: 'recommended',

  plugins: ['ember-template-lint-plugin-prettier'],

  rules: {
    prettier: true, // turn this plugin's rule on
    "eol-last": false, // or `"eol-last": "never"`
    "self-closing-void-elements": false // idem
  },
};

Details

The two ember-template-lint rules mentioned above are conflicting with Prettier formatting if you turn them on. More details there:

  • eol-last: a PR is opened on Prettier to append newlines to handelbars files. Prettier does that for every other language.
  • self-closing-void-elements rule could be removed from the set of recommended rules according to this issue.

I have tried the plugin on ember-observer: to lint / format / lint the templates. I don't have other issue. But this list could probably be appeneded if we were formatting against an other code base!

Credits

This plugin has been inspired by the prettier plugin for Eslint.

Keywords

FAQs

Package last updated on 25 Jun 2019

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