Skip to content

Commit 1e13d83

Browse files
authored
add and fix "@typescript-eslint/consistent-type-imports": "error" (#589)
1 parent 216e05c commit 1e13d83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+124
-119
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module.exports = {
2929
],
3030

3131
"@typescript-eslint/unbound-method": "error",
32+
"@typescript-eslint/consistent-type-imports": "error",
3233
},
3334
overrides: [
3435
{

example/sst.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SSTConfig } from "sst";
1+
import type { SSTConfig } from "sst";
22
import { Config, NextjsSite } from "sst/constructs";
33

44
export default {

examples/app-pages-router/app/albums/layout.tsx

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

33
export default function Layout({
44
children,

examples/app-pages-router/app/parallel/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"use client";
2-
import { ReactNode, useState } from "react";
2+
import { useState } from "react";
3+
4+
import type { ReactNode } from "react";
35

46
export default function Layout({
57
a,

examples/app-pages-router/app/ssr/layout.tsx

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

33
export default function Layout({ children }: PropsWithChildren) {
44
return (

examples/app-pages-router/middleware.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { NextRequest, NextResponse } from "next/server";
1+
import type { NextRequest } from "next/server";
2+
import { NextResponse } from "next/server";
23

34
export function middleware(request: NextRequest) {
45
const path = request.nextUrl.pathname; //new URL(request.url).pathname;

examples/app-pages-router/pages/pages_isr/index.tsx

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

33
export async function getStaticProps() {
44
return {

examples/app-pages-router/pages/pages_ssr/index.tsx

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

33
export async function getServerSideProps() {
44
return {

examples/app-router/app/albums/layout.tsx

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

33
export default function Layout({
44
children,

examples/app-router/app/api/isr/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fs from "fs/promises";
2-
import { NextRequest, NextResponse } from "next/server";
2+
import type { NextRequest } from "next/server";
3+
import { NextResponse } from "next/server";
34
import path from "path";
45

56
export const dynamic = "force-dynamic";

0 commit comments

Comments
 (0)