Skip to content

Commit 663798a

Browse files
committed
refactor: enforce import type everywhere
1 parent 3f51d9c commit 663798a

File tree

11 files changed

+11
-9
lines changed

11 files changed

+11
-9
lines changed

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import buildAAR from './targets/aar';
1111
import buildCommonJS from './targets/commonjs';
1212
import buildModule from './targets/module';
1313
import buildTypescript from './targets/typescript';
14-
import { Options } from './types';
14+
import type { Options } from './types';
1515

1616
// eslint-disable-next-line import/no-commonjs
1717
const { name } = require('../package.json');

src/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ejs from 'ejs';
44
import dedent from 'dedent';
55
import chalk from 'chalk';
66
import inquirer from 'inquirer';
7-
import yargs from 'yargs';
7+
import type yargs from 'yargs';
88
import spawn from 'cross-spawn';
99
import validateNpmPackage from 'validate-npm-package-name';
1010
import githubUsername from 'github-username';

src/targets/aar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import chalk from 'chalk';
33
import fs from 'fs-extra';
44
import del from 'del';
55
import androidAssemble from '../utils/androidAssemble';
6-
import { Input } from '../types';
76
import jetifier from '../utils/jetifier';
7+
import type { Input } from '../types';
88

99
type TargetOptions = {
1010
androidPath: string;

src/targets/commonjs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path';
22
import chalk from 'chalk';
33
import del from 'del';
44
import compile from '../utils/compile';
5-
import { Input } from '../types';
5+
import type { Input } from '../types';
66

77
type Options = Input & {
88
options?: {

src/targets/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path';
22
import chalk from 'chalk';
33
import del from 'del';
44
import compile from '../utils/compile';
5-
import { Input } from '../types';
5+
import type { Input } from '../types';
66

77
type Options = Input & {
88
options?: {

src/targets/typescript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import spawn from 'cross-spawn';
66
import del from 'del';
77
import JSON5 from 'json5';
88
import { platform } from 'os';
9-
import { Input } from '../types';
9+
import type { Input } from '../types';
1010

1111
type Options = Input & {
1212
options?: { project?: string; tsc?: string };

src/utils/androidAssemble.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import chalk from 'chalk';
33
import fs from 'fs-extra';
44
import { execFileSync } from 'child_process';
55
import { platform } from 'os';
6-
import { Report } from '../types';
6+
import type { Report } from '../types';
77

88
type Options = {
99
root: string;

src/utils/compile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import chalk from 'chalk';
44
import * as babel from '@babel/core';
55
import browserslist from 'browserslist';
66
import glob from 'glob';
7-
import { Input } from '../types';
7+
import type { Input } from '../types';
88

99
type Options = Input & {
1010
babelrc?: boolean | null | undefined;

src/utils/jetifier.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path';
22
import chalk from 'chalk';
33
import { execFileSync } from 'child_process';
44
import fs from 'fs-extra';
5-
import { Report } from '../types';
5+
import type { Report } from '../types';
66

77
type Options = {
88
root: string;

templates/common/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"allowUnreachableCode": false,
88
"allowUnusedLabels": false,
99
"esModuleInterop": true,
10+
"importsNotUsedAsValues": "error",
1011
"forceConsistentCasingInFileNames": true,
1112
"jsx": "react",
1213
"lib": ["esnext"],

0 commit comments

Comments
 (0)