https://github.com/naturalcycles/ktlint
ktlint, conveniently published to npm registry
https://github.com/naturalcycles/ktlint
Last synced: 23 days ago
JSON representation
ktlint, conveniently published to npm registry
- Host: GitHub
- URL: https://github.com/naturalcycles/ktlint
- Owner: NaturalCycles
- Created: 2021-12-11T16:34:01.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-12-29T16:57:15.000Z (4 months ago)
- Last Synced: 2025-03-22T02:34:00.647Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 399 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
## @naturalcycles/ktlint
> [ktlint](https://github.com/pinterest/ktlint) conveniently published to npm registry
[](https://www.npmjs.com/package/@naturalcycles/ktlint)
[](https://github.com/prettier/prettier)
[](https://ktlint.github.io/)Current ktlint version: `1.5.0`
# Quick start
Just run it without installation:
```shell
npx @naturalcycles/ktlint --version
```Or, install it like this:
```shell
yarn add -D @naturalcycles/ktlint
```Run ktlint (locally installed into `./node_modules`):
```shell
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](https://github.com/pinterest/ktlint/releases)
- 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`