diff --git a/.eslintrc.json b/.eslintrc.json index 47f2eb9854..a858845c69 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -142,17 +142,20 @@ }, "rules": { // Disable base rule to avoid conflict + "no-duplicate-imports": "off", "no-unused-vars": "off", "no-useless-constructor": "off", "@typescript-eslint/array-type": "error", "@typescript-eslint/await-thenable": "error", "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/consistent-type-imports": "error", "@typescript-eslint/explicit-function-return-type": [ "error", {"allowExpressions": true} ], "@typescript-eslint/member-ordering": "error", + "@typescript-eslint/no-duplicate-imports": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-extraneous-class": "error", "@typescript-eslint/no-non-null-assertion": "off", diff --git a/frontend_tests/puppeteer_lib/common.ts b/frontend_tests/puppeteer_lib/common.ts index 479edadd16..b944eadf58 100644 --- a/frontend_tests/puppeteer_lib/common.ts +++ b/frontend_tests/puppeteer_lib/common.ts @@ -2,7 +2,8 @@ import {strict as assert} from "assert"; import "css.escape"; import path from "path"; -import {Browser, ElementHandle, Page, launch} from "puppeteer"; +import type {Browser, ElementHandle, Page} from "puppeteer"; +import {launch} from "puppeteer"; import {test_credentials} from "../../var/puppeteer/test_credentials"; diff --git a/static/js/blueslip_stacktrace.ts b/static/js/blueslip_stacktrace.ts index b28cc01be6..ea41057cf1 100644 --- a/static/js/blueslip_stacktrace.ts +++ b/static/js/blueslip_stacktrace.ts @@ -1,6 +1,6 @@ import ErrorStackParser from "error-stack-parser"; import $ from "jquery"; -import StackFrame from "stackframe"; +import type StackFrame from "stackframe"; import StackTraceGPS from "stacktrace-gps"; import render_blueslip_stacktrace from "../templates/blueslip_stacktrace.hbs"; diff --git a/static/js/types/stacktrace-gps/index.d.ts b/static/js/types/stacktrace-gps/index.d.ts index 153f06e6a2..0f0c2cfa50 100644 --- a/static/js/types/stacktrace-gps/index.d.ts +++ b/static/js/types/stacktrace-gps/index.d.ts @@ -1,5 +1,5 @@ -import SourceMap from "source-map"; -import StackFrame from "stackframe"; +import type SourceMap from "source-map"; +import type StackFrame from "stackframe"; declare namespace StackTraceGPS { type StackTraceGPSOptions = { diff --git a/tools/debug-require-webpack-plugin.ts b/tools/debug-require-webpack-plugin.ts index e02cf14a03..5c2d278126 100644 --- a/tools/debug-require-webpack-plugin.ts +++ b/tools/debug-require-webpack-plugin.ts @@ -4,7 +4,8 @@ import path from "path"; -import webpack, {Template} from "webpack"; +import type webpack from "webpack"; +import {Template} from "webpack"; export default class DebugRequirePlugin { apply(compiler: webpack.Compiler): void {