@naturalcycles/ktlint
TypeScript icon, indicating that this package has built-in type declarations

1.11.0 • Public • Published

@naturalcycles/ktlint

ktlint conveniently published to npm registry

npm code style: prettier ktlint

Current ktlint version: 1.2.1

Quick start

Just run it without installation:

npx @naturalcycles/ktlint --version

Or, install it like this:

yarn add -D @naturalcycles/ktlint

Run ktlint (locally installed into ./node_modules):

yarn ktlint --version

No Step 3!

API

You can run ktlint programmatically via Node.js by calling ktlintAll() function exposed by this module. It returns a Promise (rejects on non-zero code from ktlint, resolves on success).

Development

To update the ktlint version that is shipped here:

  • Check the ktlint release notes
  • Change it in scripts/install.ts to the new version (and in this readme.md too)
  • Delete resources/ktlint
  • Run yarn tsn install, which will download the new version
  • Test it with yarn ktlint --version, it should print the new version
  • Test it with yarn ktlint -F

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i @naturalcycles/ktlint

    Weekly Downloads

    161

    Version

    1.11.0

    License

    MIT

    Unpacked Size

    80.2 MB

    Total Files

    9

    Last publish

    Collaborators

    • kirillgroshkov
    • kribor