Skip to content

Commit

Permalink
chore: Enable rule no-import-type-side-effects (#15627)
Browse files Browse the repository at this point in the history
rule
  • Loading branch information
liuxingbaoyu committed May 13, 2023
1 parent f347e9f commit 2b70257
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ module.exports = {
"error",
{ ignoreArrowShorthand: true },
],
"@typescript-eslint/no-import-type-side-effects": "error",
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-generator/src/printer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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+$/;
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-parser/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Options } from "./options";
import type { Options } from "./options";
import {
hasPlugin,
validatePlugins,
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-parser/src/parser/util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Position } from "../util/location";
import type { Position } from "../util/location";
import {
tokenIsLiteralPropertyName,
tt,
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-parser/src/plugins/estree.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-parser/src/plugins/jsx/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`({
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-parser/src/tokenizer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-parser/src/tokenizer/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b70257

Please sign in to comment.