パッケージの詳細

prettier-plugin-phpdoc

SanderRonde23MIT1.0.5

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

更新履歴

Changelog

1.0.4

  • Don't consume unions inside statics
  • Fix bug where nullable return types would result in a union of the callable with null

1.0.1 - 1.0.3

  • Fix issue with wrapping when parameter description started with a newline

1.0.0

  • Initial release