diff --git a/@commitlint/prompt/src/index.ts b/@commitlint/prompt/src/index.ts
index de92d793e5..ce0ef97724 100644
--- a/@commitlint/prompt/src/index.ts
+++ b/@commitlint/prompt/src/index.ts
@@ -1,5 +1,5 @@
import inquirer from 'inquirer';
-import input from './input';
+import {input} from './input';
type Commit = (input: string) => void;
diff --git a/@commitlint/prompt/src/input.test.ts b/@commitlint/prompt/src/input.test.ts
index f0d806c79d..cde2a5efb2 100644
--- a/@commitlint/prompt/src/input.test.ts
+++ b/@commitlint/prompt/src/input.test.ts
@@ -1,6 +1,6 @@
import {Answers, PromptModule, QuestionCollection} from 'inquirer';
///
-import input from './input';
+import {input} from './input';
import chalk from 'chalk';
jest.mock(
diff --git a/@commitlint/prompt/src/input.ts b/@commitlint/prompt/src/input.ts
index 4e4537dcc8..ff7db40901 100644
--- a/@commitlint/prompt/src/input.ts
+++ b/@commitlint/prompt/src/input.ts
@@ -4,7 +4,7 @@ import {DistinctQuestion, PromptModule} from 'inquirer';
import format from './library/format';
import getPrompt from './library/get-prompt';
import settings from './settings';
-import {InputSetting, Result} from './library/types';
+import type {InputSetting, Result} from './library/types';
import {getHasName, getMaxLength, getRules} from './library/utils';
import InputCustomPrompt from './inquirer/InputCustomPrompt';
@@ -15,7 +15,7 @@ import InputCustomPrompt from './inquirer/InputCustomPrompt';
* @param prompter
* @return commit message
*/
-export default async function input(prompter: PromptModule): Promise {
+export async function input(prompter: PromptModule): Promise {
const {rules} = await load();
const parts = ['type', 'scope', 'subject', 'body', 'footer'] as const;
const headerParts = ['type', 'scope', 'subject'];
@@ -30,14 +30,14 @@ export default async function input(prompter: PromptModule): Promise {
prompter.registerPrompt('input-custom', InputCustomPrompt);
for (const input of parts) {
- const inputSettings: InputSetting = settings[input];
+ const inputSetting: InputSetting = settings[input];
const inputRules = getRules(input, rules);
if (headerParts.includes(input) && maxLength < Infinity) {
- inputSettings.header = {
+ inputSetting.header = {
length: maxLength,
};
}
- const question = getPrompt(input, inputRules, inputSettings);
+ const question = getPrompt(input, inputRules, inputSetting);
if (question) {
questions.push(question);
}