Skip to content

nicolaibach/prettier-plugin-flavours

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prettier-plugin-flavours

This plugin for Prettier maps a bunch of more or less exotic file types to languages already supported by Prettier.

Why this plugin?

Recently i had to work with several file types not supported by Prettier and really missed the handy format on save feature in VSCode.

I tried changing VSCodes's language identifier like in this example for Liquid templates:

"files.associations": {
  "*.liquid": "html"
}

This works in the way that Prettier will process those files, but highlighting and auto-completion for Liquid specific syntax breaks.

To get around this issue, this plugin maps Prettier's existing parsers to new file extensions.

Installation

npm install -D https://github.com/nicolaibach/prettier-plugin-flavours.git

Usage

Plugins are automatically loaded if you have them installed in the same node_modules directory where prettier is located.

–– https://prettier.io/docs/en/plugins.html#using-plugins

Language Mapping

Language File Extension Prettier Parser
Liquid .liquid HTML
JavaScript for Automation (JXA) .jxa Babel

Resources

License

This project is MIT licensed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors