From 7e546d9e78539534ba30bccff7da7d5fa381aa9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lytek?= Date: Wed, 9 Aug 2023 10:24:41 +0200 Subject: [PATCH] Fix import/no-cycle --- examples/.eslintrc | 8 ++------ examples/apollo-federation/reviews/product/index.ts | 2 +- examples/apollo-federation/reviews/product/resolver.ts | 1 - examples/apollo-federation/reviews/review/data.ts | 1 - examples/apollo-federation/reviews/review/index.ts | 1 - examples/apollo-federation/reviews/review/resolver.ts | 1 - examples/apollo-federation/reviews/review/review.ts | 1 - examples/apollo-federation/reviews/user/index.ts | 1 - examples/apollo-federation/reviews/user/resolver.ts | 1 - examples/mikro-orm/entities/rating.ts | 1 - examples/mikro-orm/entities/recipe.ts | 1 - examples/typeorm-basic-usage/entities/rating.ts | 1 - examples/typeorm-basic-usage/entities/recipe.ts | 1 - examples/typeorm-lazy-relations/entities/rating.ts | 1 - examples/typeorm-lazy-relations/entities/recipe.ts | 2 -- examples/typeorm-lazy-relations/entities/user.ts | 1 - 16 files changed, 3 insertions(+), 22 deletions(-) diff --git a/examples/.eslintrc b/examples/.eslintrc index 1db100f40..69bbd09ef 100644 --- a/examples/.eslintrc +++ b/examples/.eslintrc @@ -2,11 +2,7 @@ "rules": { "no-console": "off", "class-methods-use-this": "off", - "import/no-extraneous-dependencies": [ - "error", - { - "devDependencies": true - } - ] + "import/no-cycle": "off", + "import/no-extraneous-dependencies": ["error", { "devDependencies": true }] } } diff --git a/examples/apollo-federation/reviews/product/index.ts b/examples/apollo-federation/reviews/product/index.ts index 0c9d92093..c3ffabe68 100644 --- a/examples/apollo-federation/reviews/product/index.ts +++ b/examples/apollo-federation/reviews/product/index.ts @@ -1,3 +1,3 @@ export * from "./product"; -// eslint-disable-next-line import/no-cycle + export * from "./resolver"; diff --git a/examples/apollo-federation/reviews/product/resolver.ts b/examples/apollo-federation/reviews/product/resolver.ts index eb2ea925d..ffd36a68c 100644 --- a/examples/apollo-federation/reviews/product/resolver.ts +++ b/examples/apollo-federation/reviews/product/resolver.ts @@ -1,6 +1,5 @@ import { FieldResolver, Resolver, Root } from "type-graphql"; import { Product } from "./product"; -// eslint-disable-next-line import/no-cycle import { Review, reviews } from "../review"; @Resolver(_of => Product) diff --git a/examples/apollo-federation/reviews/review/data.ts b/examples/apollo-federation/reviews/review/data.ts index 0af13f01b..9d0c08750 100644 --- a/examples/apollo-federation/reviews/review/data.ts +++ b/examples/apollo-federation/reviews/review/data.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-cycle import { Review } from "./review"; import { Product } from "../product"; import { User } from "../user"; diff --git a/examples/apollo-federation/reviews/review/index.ts b/examples/apollo-federation/reviews/review/index.ts index e42d133eb..6fa85506b 100644 --- a/examples/apollo-federation/reviews/review/index.ts +++ b/examples/apollo-federation/reviews/review/index.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-cycle export * from "./data"; export * from "./resolver"; export * from "./review"; diff --git a/examples/apollo-federation/reviews/review/resolver.ts b/examples/apollo-federation/reviews/review/resolver.ts index 7459837ca..eb59bf84b 100644 --- a/examples/apollo-federation/reviews/review/resolver.ts +++ b/examples/apollo-federation/reviews/review/resolver.ts @@ -1,5 +1,4 @@ import { FieldResolver, Resolver } from "type-graphql"; -// eslint-disable-next-line import/no-cycle import { reviews } from "./data"; import { Review } from "./review"; diff --git a/examples/apollo-federation/reviews/review/review.ts b/examples/apollo-federation/reviews/review/review.ts index a26a88eae..de8a376f6 100644 --- a/examples/apollo-federation/reviews/review/review.ts +++ b/examples/apollo-federation/reviews/review/review.ts @@ -1,5 +1,4 @@ import { Directive, Field, ID, ObjectType } from "type-graphql"; -// eslint-disable-next-line import/no-cycle import { Product } from "../product"; import { User } from "../user"; diff --git a/examples/apollo-federation/reviews/user/index.ts b/examples/apollo-federation/reviews/user/index.ts index f8008e55e..5dcb340c1 100644 --- a/examples/apollo-federation/reviews/user/index.ts +++ b/examples/apollo-federation/reviews/user/index.ts @@ -1,3 +1,2 @@ -// eslint-disable-next-line import/no-cycle export * from "./resolver"; export * from "./user"; diff --git a/examples/apollo-federation/reviews/user/resolver.ts b/examples/apollo-federation/reviews/user/resolver.ts index eb4c7ac3f..d4a8b23bc 100644 --- a/examples/apollo-federation/reviews/user/resolver.ts +++ b/examples/apollo-federation/reviews/user/resolver.ts @@ -1,6 +1,5 @@ import { FieldResolver, Resolver, Root } from "type-graphql"; import { User } from "./user"; -// eslint-disable-next-line import/no-cycle import { Review, reviews } from "../review"; @Resolver(_of => User) diff --git a/examples/mikro-orm/entities/rating.ts b/examples/mikro-orm/entities/rating.ts index b1974283f..7b8eafdea 100644 --- a/examples/mikro-orm/entities/rating.ts +++ b/examples/mikro-orm/entities/rating.ts @@ -1,6 +1,5 @@ import { Entity, ManyToOne, OptionalProps, PrimaryKey, Property } from "@mikro-orm/core"; import { Field, Int, ObjectType } from "type-graphql"; -// eslint-disable-next-line import/no-cycle import { Recipe } from "./recipe"; import { User } from "./user"; diff --git a/examples/mikro-orm/entities/recipe.ts b/examples/mikro-orm/entities/recipe.ts index d5390fba4..95ce66e3d 100644 --- a/examples/mikro-orm/entities/recipe.ts +++ b/examples/mikro-orm/entities/recipe.ts @@ -1,6 +1,5 @@ import { Collection, Entity, ManyToOne, OneToMany, PrimaryKey, Property } from "@mikro-orm/core"; import { Field, ID, ObjectType } from "type-graphql"; -// eslint-disable-next-line import/no-cycle import { Rating } from "./rating"; import { User } from "./user"; diff --git a/examples/typeorm-basic-usage/entities/rating.ts b/examples/typeorm-basic-usage/entities/rating.ts index 9c5b90a03..b19a2da14 100644 --- a/examples/typeorm-basic-usage/entities/rating.ts +++ b/examples/typeorm-basic-usage/entities/rating.ts @@ -7,7 +7,6 @@ import { PrimaryGeneratedColumn, RelationId, } from "typeorm"; -// eslint-disable-next-line import/no-cycle import { Recipe } from "./recipe"; import { User } from "./user"; diff --git a/examples/typeorm-basic-usage/entities/recipe.ts b/examples/typeorm-basic-usage/entities/recipe.ts index 4b37c76a1..cc205bd14 100644 --- a/examples/typeorm-basic-usage/entities/recipe.ts +++ b/examples/typeorm-basic-usage/entities/recipe.ts @@ -1,6 +1,5 @@ import { Field, ID, ObjectType } from "type-graphql"; import { Column, Entity, ManyToOne, OneToMany, PrimaryGeneratedColumn, RelationId } from "typeorm"; -// eslint-disable-next-line import/no-cycle import { Rating } from "./rating"; import { User } from "./user"; diff --git a/examples/typeorm-lazy-relations/entities/rating.ts b/examples/typeorm-lazy-relations/entities/rating.ts index a5024a7b5..bda52f66d 100644 --- a/examples/typeorm-lazy-relations/entities/rating.ts +++ b/examples/typeorm-lazy-relations/entities/rating.ts @@ -1,6 +1,5 @@ import { Field, Int, ObjectType } from "type-graphql"; import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm"; -// eslint-disable-next-line import/no-cycle import { Recipe } from "./recipe"; import { User } from "./user"; diff --git a/examples/typeorm-lazy-relations/entities/recipe.ts b/examples/typeorm-lazy-relations/entities/recipe.ts index 9c0eeef68..082846c5b 100644 --- a/examples/typeorm-lazy-relations/entities/recipe.ts +++ b/examples/typeorm-lazy-relations/entities/recipe.ts @@ -1,8 +1,6 @@ import { Field, ID, ObjectType } from "type-graphql"; import { Column, Entity, ManyToOne, OneToMany, PrimaryGeneratedColumn } from "typeorm"; -// eslint-disable-next-line import/no-cycle import { Rating } from "./rating"; -// eslint-disable-next-line import/no-cycle import { User } from "./user"; @Entity() diff --git a/examples/typeorm-lazy-relations/entities/user.ts b/examples/typeorm-lazy-relations/entities/user.ts index 02b6b08e1..8e89c011d 100644 --- a/examples/typeorm-lazy-relations/entities/user.ts +++ b/examples/typeorm-lazy-relations/entities/user.ts @@ -1,6 +1,5 @@ import { Field, ID, ObjectType } from "type-graphql"; import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm"; -// eslint-disable-next-line import/no-cycle import { Recipe } from "./recipe"; @ObjectType()