Skip to content

nice-move/prettier-plugin-ssh-config

Repository files navigation

prettier-plugin-ssh-config

A prettier plugin for ssh config.

npm github node

Examples

Host *
  HostName localhost
  User root
Host abc
  HostName 127.0.0.1
  User nginx

Installation

npm install prettier prettier-plugin-ssh-config --save-dev

Usage

prettier --write ssh_config

Support Filenames

  • ssh.config
  • ssh_config
  • ssh-config
  • sshconfig
  • *.ssh_config
  • *.ssh-config
  • *.sshconfig

To support custom config name:

// .prettierrc.json
{
  "overrides": [
    {
      "files": ".ssh/config",
      "options": {
        "parser": "ssh-config"
      }
    }
  ]
}

Options

This plugin took options from prettier. Support useTabs/tabWidth/endOfLine , not support printWidth/requirePragma/insertPragma .

Related