Skip to content

Commit 6b17155

Browse files
committed
refactor: enforce consistent type imports and exports in TypeScript files
1 parent 5d78cef commit 6b17155

22 files changed

+23
-21
lines changed

eslint.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export default tseslint.config(
4646
},
4747
},
4848
],
49+
"@typescript-eslint/consistent-type-imports": "error",
50+
"@typescript-eslint/consistent-type-exports": "error",
4951
},
5052
},
5153
);

src/validateBRPhoneNumber.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValidateFunctions } from "./types";
1+
import type { ValidateFunctions } from "./types";
22

33
const defaultErrorMsg: string[] = [
44
"Field phone number cannot be empty",

src/validateEmail.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValidateFunctions } from "./types";
1+
import type { ValidateFunctions } from "./types";
22
import isEmail from "./isEmail";
33

44
const defaultErrorMsg: string[] = [

src/validateName.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValidateFunctions } from "./types";
1+
import type { ValidateFunctions } from "./types";
22

33
const defaultErrorMsg: string[] = [
44
"Name cannot be empty",

src/validatePassportNumber.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValidatePassportNumber } from "./types";
1+
import type { ValidatePassportNumber } from "./types";
22

33
/**
44
* @example validatePassportNumber('A1234567');

src/validatePassword.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValidateFunctions } from "./types";
1+
import type { ValidateFunctions } from "./types";
22

33
const defaultErrorMsg: string[] = [
44
"This password is too long",

src/validatePhoneNumber.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValidateFunctions } from "./types";
1+
import type { ValidateFunctions } from "./types";
22

33
const defaultErrorMsg: string[] = [
44
"Phone number cannot be empty",

src/validateSurname.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValidateFunctions } from "./types";
1+
import type { ValidateFunctions } from "./types";
22

33
const defaultErrorMsg: string[] = [
44
"Surname cannot be empty",

src/validateTextarea.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValidateFunctions } from "./types";
1+
import type { ValidateFunctions } from "./types";
22

33
const defaultErrorMsg: string[] = [
44
"This textarea is too big",

src/validateUSPhoneNumber.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValidateFunctions } from "./types";
1+
import type { ValidateFunctions } from "./types";
22

33
const defaultErrorMsg: string[] = [
44
"US phone number cannot be empty",

0 commit comments

Comments
 (0)