Skip to content

Commit

Permalink
feat: update to ktlint 0.47.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Sep 10, 2022
1 parent 72eb606 commit e52392e
Show file tree
Hide file tree
Showing 7 changed files with 458 additions and 464 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
if: "!contains(github.event.head_commit.message, 'skip ci')"
env: { NODE_OPTIONS: '--max-old-space-size=3200' }
steps:
- { uses: actions/checkout@v2, with: { persist-credentials: true } }
- { uses: actions/setup-node@v2, with: { node-version: 16 } }
- { uses: actions/checkout@v3, with: { persist-credentials: true } }
- { uses: actions/setup-node@v3, with: { node-version: 16, cache: 'yarn' } }

# Cache for npm/npx in ~/.npm
- uses: actions/cache@v2
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![ktlint](https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg)](https://ktlint.github.io/)

Current ktlint version: `0.46.1`
Current ktlint version: `0.47.1`

# Quick start

Expand Down Expand Up @@ -40,7 +40,7 @@ module. It returns a Promise (rejects on non-zero code from `ktlint`, resolves o
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
- 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
Expand Down
Binary file modified resources/ktlint
Binary file not shown.
3 changes: 2 additions & 1 deletion scripts/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { ktlintPath } from '../src/paths'

const _pipeline = promisify(pipeline) as any

// eslint-disable-next-line unicorn/prefer-top-level-await
void (async () => {
if (fs.existsSync(ktlintPath)) {
// const {size, mode} = fs.statSync(ktlintPath)
Expand All @@ -24,7 +25,7 @@ void (async () => {
// https://github.com/pinterest/ktlint/issues/1195
// Hence, reverting to 0.40.0
// const ktlintVersion = '0.43.2'
const ktlintVersion = '0.46.1'
const ktlintVersion = '0.47.1'
console.log(`downloading ktlint ${ktlintVersion} from github, may take some time...`)

const url = `https://github.com/pinterest/ktlint/releases/download/${ktlintVersion}/ktlint`
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "@naturalcycles/dev-lib/cfg/tsconfig.json",
"compilerOptions": {
"sourceMap": true,
"outDir": "dist"
},
"include": ["src"],
Expand Down
Loading

0 comments on commit e52392e

Please sign in to comment.