Skip to content

Commit d4de920

Browse files
43081jgithub-actions[bot]
authored andcommitted
[ci] format
1 parent d45408f commit d4de920

File tree

12 files changed

+62
-69
lines changed

12 files changed

+62
-69
lines changed

biome.json

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
3-
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
4-
"files": { "ignoreUnknown": false, "includes": ["**", "!**/dist/**"] },
5-
"formatter": {
6-
"enabled": true,
7-
"useEditorconfig": true,
8-
"formatWithErrors": false,
9-
"indentStyle": "tab",
10-
"indentWidth": 2,
11-
"lineEnding": "lf",
12-
"lineWidth": 100,
13-
"attributePosition": "auto",
14-
"bracketSpacing": true,
15-
"includes": [
16-
"**",
17-
"!**/.github/workflows/**/*.yml",
18-
"!**/.changeset/**/*.md",
19-
"!**/pnpm-lock.yaml",
20-
"!**/package.json"
21-
]
22-
},
23-
"assist": { "actions": { "source": { "organizeImports": "on" } } },
24-
"linter": {
25-
"enabled": true,
26-
"rules": { "recommended": true, "suspicious": { "noExplicitAny": "off" } }
27-
},
28-
"javascript": {
29-
"formatter": {
30-
"jsxQuoteStyle": "double",
31-
"quoteProperties": "asNeeded",
32-
"trailingCommas": "es5",
33-
"semicolons": "always",
34-
"arrowParentheses": "always",
35-
"bracketSameLine": false,
36-
"quoteStyle": "single",
37-
"attributePosition": "auto",
38-
"bracketSpacing": true
39-
}
40-
},
41-
"overrides": [
42-
{
43-
"includes": ["**/*.json", "**/*.toml", "**/*.yml"],
44-
"formatter": { "indentStyle": "space" }
45-
}
46-
]
2+
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
3+
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
4+
"files": { "ignoreUnknown": false, "includes": ["**", "!**/dist/**"] },
5+
"formatter": {
6+
"enabled": true,
7+
"useEditorconfig": true,
8+
"formatWithErrors": false,
9+
"indentStyle": "tab",
10+
"indentWidth": 2,
11+
"lineEnding": "lf",
12+
"lineWidth": 100,
13+
"attributePosition": "auto",
14+
"bracketSpacing": true,
15+
"includes": [
16+
"**",
17+
"!**/.github/workflows/**/*.yml",
18+
"!**/.changeset/**/*.md",
19+
"!**/pnpm-lock.yaml",
20+
"!**/package.json"
21+
]
22+
},
23+
"assist": { "actions": { "source": { "organizeImports": "on" } } },
24+
"linter": {
25+
"enabled": true,
26+
"rules": { "recommended": true, "suspicious": { "noExplicitAny": "off" } }
27+
},
28+
"javascript": {
29+
"formatter": {
30+
"jsxQuoteStyle": "double",
31+
"quoteProperties": "asNeeded",
32+
"trailingCommas": "es5",
33+
"semicolons": "always",
34+
"arrowParentheses": "always",
35+
"bracketSameLine": false,
36+
"quoteStyle": "single",
37+
"attributePosition": "auto",
38+
"bracketSpacing": true
39+
}
40+
},
41+
"overrides": [
42+
{
43+
"includes": ["**/*.json", "**/*.toml", "**/*.yml"],
44+
"formatter": { "indentStyle": "space" }
45+
}
46+
]
4747
}

examples/basic/progress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { setTimeout } from 'node:timers/promises';
2-
import * as p from '@clack/prompts';
32
import type { ProgressResult } from '@clack/prompts';
3+
import * as p from '@clack/prompts';
44

55
async function fakeProgress(progressbar: ProgressResult): Promise<void> {
66
await setTimeout(1000);

packages/core/src/index.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
export type { ClackState as State } from './types.js';
2-
export type { ClackSettings } from './utils/settings.js';
3-
1+
export { default as AutocompletePrompt } from './prompts/autocomplete.js';
42
export { default as ConfirmPrompt } from './prompts/confirm.js';
53
export { default as GroupMultiSelectPrompt } from './prompts/group-multiselect.js';
64
export { default as MultiSelectPrompt } from './prompts/multi-select.js';
@@ -9,6 +7,7 @@ export { default as Prompt } from './prompts/prompt.js';
97
export { default as SelectPrompt } from './prompts/select.js';
108
export { default as SelectKeyPrompt } from './prompts/select-key.js';
119
export { default as TextPrompt } from './prompts/text.js';
12-
export { default as AutocompletePrompt } from './prompts/autocomplete.js';
13-
export { block, isCancel, getColumns } from './utils/index.js';
14-
export { updateSettings, settings } from './utils/settings.js';
10+
export type { ClackState as State } from './types.js';
11+
export { block, getColumns, isCancel } from './utils/index.js';
12+
export type { ClackSettings } from './utils/settings.js';
13+
export { settings, updateSettings } from './utils/settings.js';

packages/core/src/prompts/prompt.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ import readline, { type Key, type ReadLine } from 'node:readline';
33
import type { Readable, Writable } from 'node:stream';
44
import { cursor, erase } from 'sisteransi';
55
import wrap from 'wrap-ansi';
6-
7-
import { CANCEL_SYMBOL, diffLines, isActionKey, setRawMode, settings } from '../utils/index.js';
8-
96
import type { ClackEvents, ClackState } from '../types.js';
107
import type { Action } from '../utils/index.js';
8+
import { CANCEL_SYMBOL, diffLines, isActionKey, setRawMode, settings } from '../utils/index.js';
119

1210
export interface PromptOptions<TValue, Self extends Prompt<TValue>> {
1311
render(this: Omit<Self, 'prompt'>): string | undefined;

packages/core/src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { ReadStream, WriteStream } from 'node:tty';
66
import { cursor } from 'sisteransi';
77
import { isActionKey } from './settings.js';
88

9-
export * from './string.js';
109
export * from './settings.js';
10+
export * from './string.js';
1111

1212
const isWindows = globalThis.process.platform.startsWith('win');
1313

packages/core/test/prompts/confirm.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { cursor } from 'sisteransi';
32
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
43
import { default as ConfirmPrompt } from '../../src/prompts/confirm.js';

packages/core/test/prompts/select.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { cursor } from 'sisteransi';
32
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
43
import { default as SelectPrompt } from '../../src/prompts/select.js';

packages/prompts/src/group.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ export interface PromptGroupOptions<T> {
1313
* Control how the group can be canceled
1414
* if one of the prompts is canceled.
1515
*/
16-
onCancel?: (opts: {
17-
results: Prettify<Partial<PromptGroupAwaitedReturn<T>>>;
18-
}) => void;
16+
onCancel?: (opts: { results: Prettify<Partial<PromptGroupAwaitedReturn<T>>> }) => void;
1917
}
2018

2119
export type PromptGroup<T> = {

packages/prompts/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
export { isCancel, updateSettings, settings, type ClackSettings } from '@clack/core';
1+
export { type ClackSettings, isCancel, settings, updateSettings } from '@clack/core';
22

33
export * from './autocomplete.js';
44
export * from './common.js';
55
export * from './confirm.js';
6-
export * from './group-multi-select.js';
76
export * from './group.js';
7+
export * from './group-multi-select.js';
88
export * from './limit-options.js';
99
export * from './log.js';
1010
export * from './messages.js';
@@ -13,8 +13,8 @@ export * from './note.js';
1313
export * from './password.js';
1414
export * from './path.js';
1515
export * from './progress-bar.js';
16-
export * from './select-key.js';
1716
export * from './select.js';
17+
export * from './select-key.js';
1818
export * from './spinner.js';
1919
export * from './stream.js';
2020
export * from './task.js';

packages/prompts/src/spinner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import color from 'picocolors';
33
import { cursor, erase } from 'sisteransi';
44
import {
55
type CommonOptions,
6+
isCI as isCIFn,
67
S_BAR,
78
S_STEP_CANCEL,
89
S_STEP_ERROR,
910
S_STEP_SUBMIT,
10-
isCI as isCIFn,
1111
unicode,
1212
} from './common.js';
1313

@@ -44,7 +44,7 @@ export const spinner = ({
4444
let isSpinnerActive = false;
4545
let isCancelled = false;
4646
let _message = '';
47-
let _prevMessage: string | undefined ;
47+
let _prevMessage: string | undefined;
4848
let _origin: number = performance.now();
4949

5050
const handleExit = (code: number) => {

0 commit comments

Comments
 (0)