Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

prettier-plugin-phpdoc

SanderRonde375MIT1.2.1

A prettier plugin for sorting PHPDoc

prettier, plugin, phpdoc, php

readme

Prettier Plugin: PHPDoc

A prettier plugin that formats PHPDoc and the types used in them.

Installation

npm install --save-dev prettier-plugin-phpdoc

Usage

Add to Prettier Config

module.exports = {
    plugins: ['./node_modules/prettier-plugin-phpdoc/dist/index.js'],
};

Options

  • wrapText: (default: false) Whether to wrap text in PHPDoc after it crosses printWidth
  • expandNull: (default: false) Whether to expand ?int (and other types) to null|int