diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 2506bf94189c..230b6acdb8b0 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -69,6 +69,7 @@ module.exports = { "error", { ignoreArrowShorthand: true }, ], + "@typescript-eslint/no-import-type-side-effects": "error", }, }, { diff --git a/packages/babel-generator/src/printer.ts b/packages/babel-generator/src/printer.ts index b5c37f6b5b58..6b6388fa81bf 100644 --- a/packages/babel-generator/src/printer.ts +++ b/packages/babel-generator/src/printer.ts @@ -18,7 +18,7 @@ import type { Opts as jsescOptions } from "jsesc"; import * as generatorFunctions from "./generators"; import type SourceMap from "./source-map"; import * as charCodes from "charcodes"; -import { type TraceMap } from "@jridgewell/trace-mapping"; +import type { TraceMap } from "@jridgewell/trace-mapping"; const SCIENTIFIC_NOTATION = /e/i; const ZERO_DECIMAL_INTEGER = /\.0+$/; diff --git a/packages/babel-parser/src/index.ts b/packages/babel-parser/src/index.ts index a22baff1ba48..448126d3c5b4 100644 --- a/packages/babel-parser/src/index.ts +++ b/packages/babel-parser/src/index.ts @@ -1,4 +1,4 @@ -import { type Options } from "./options"; +import type { Options } from "./options"; import { hasPlugin, validatePlugins, diff --git a/packages/babel-parser/src/parser/util.ts b/packages/babel-parser/src/parser/util.ts index 8a3d398de3f4..24a47eccbccd 100644 --- a/packages/babel-parser/src/parser/util.ts +++ b/packages/babel-parser/src/parser/util.ts @@ -1,4 +1,4 @@ -import { type Position } from "../util/location"; +import type { Position } from "../util/location"; import { tokenIsLiteralPropertyName, tt, diff --git a/packages/babel-parser/src/plugins/estree.ts b/packages/babel-parser/src/plugins/estree.ts index af13e32f09c6..67356a1c544f 100644 --- a/packages/babel-parser/src/plugins/estree.ts +++ b/packages/babel-parser/src/plugins/estree.ts @@ -1,4 +1,4 @@ -import { type TokenType } from "../tokenizer/types"; +import type { TokenType } from "../tokenizer/types"; import type Parser from "../parser"; import type { ExpressionErrors } from "../parser/util"; import type * as N from "../types"; diff --git a/packages/babel-parser/src/plugins/jsx/index.ts b/packages/babel-parser/src/plugins/jsx/index.ts index f58b33182277..e65c27c7cb12 100644 --- a/packages/babel-parser/src/plugins/jsx/index.ts +++ b/packages/babel-parser/src/plugins/jsx/index.ts @@ -17,7 +17,7 @@ import { isIdentifierChar, isIdentifierStart } from "../../util/identifier"; import type { Position } from "../../util/location"; import { isNewLine } from "../../util/whitespace"; import { Errors, ParseErrorEnum } from "../../parse-error"; -import { type Undone } from "../../parser/node"; +import type { Undone } from "../../parser/node"; /* eslint sort-keys: "error" */ const JsxErrors = ParseErrorEnum`jsx`({ diff --git a/packages/babel-parser/src/tokenizer/index.ts b/packages/babel-parser/src/tokenizer/index.ts index a5653239338f..edd0c7649677 100644 --- a/packages/babel-parser/src/tokenizer/index.ts +++ b/packages/babel-parser/src/tokenizer/index.ts @@ -17,7 +17,7 @@ import { keywords as keywordTypes, type TokenType, } from "./types"; -import { type TokContext } from "./context"; +import type { TokContext } from "./context"; import { Errors, type ParseError, diff --git a/packages/babel-parser/src/tokenizer/state.ts b/packages/babel-parser/src/tokenizer/state.ts index 81fa43a1d810..4949f5c9a047 100644 --- a/packages/babel-parser/src/tokenizer/state.ts +++ b/packages/babel-parser/src/tokenizer/state.ts @@ -6,7 +6,7 @@ import { Position } from "../util/location"; import { types as ct, type TokContext } from "./context"; import { tt, type TokenType } from "./types"; import type { Errors } from "../parse-error"; -import { type ParseError } from "../parse-error"; +import type { ParseError } from "../parse-error"; export type DeferredStrictError = | typeof Errors.StrictNumericEscape