@naturalcycles/ktlint

ktlint, conveniently published to npm registry

Usage no npm install needed!

<script type="module">
  import naturalcyclesKtlint from 'https://cdn.skypack.dev/@naturalcycles/ktlint';
</script>

README

@naturalcycles/ktlint

ktlint conveniently published to npm registry

npm code style: prettier ktlint

Current ktlint version: 0.44.0

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).