Neutrinos Peludos Magnéticos

    @emdaer/transform-prettier

    3.2.31 • Public • Published

    @emdaer/transform-prettier · Travis Documented with emdaer Maintained with lerna

    An emdaer transformation that formats markdown, including code blocks, using prettier

    Usage

    @emdaer/transform-prettier is an emdaer transform – see the emdaer monorepo for more information

    Documentation

    Example

      ()  =>{
      const sayHi = console.log( 'hello world')
        return "0"
      }

    is transformed into

    () => {
      const sayHi = console.log('hello world');
      return '0';
    };

    Usage in README

    <!--emdaer-t
      - '@emdaer/transform-prettier'
      - options:
          config: ./prettier.config.js
    -->

    prettierTransform

    Transform a string using prettier.

    Parameters

    • content string The content
    • options Object Transform options (optional, default {options:{parser:PARSER}})
      • options.options Object Prettier options
        • options.options.config string The path to the Prettier config file. Overrides other Prettier options provided.

    Examples

    <!--emdaer-t
      - '@emdaer/transform-prettier'
      - options:
          config: ./prettier.config.js
    -->

    Returns Promise<string> The content formatted by Prettier

    Install

    npm i @emdaer/transform-prettier

    DownloadsWeekly Downloads

    9,058

    Version

    3.2.31

    License

    MIT

    Unpacked Size

    34.8 kB

    Total Files

    8

    Last publish

    Collaborators

    • beautyhammer
    • emdaerbot
    • flipactual
    • infiniteluke