mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 23:42:18 +02:00
[Dev] Update depcruiser to enforce no non-type export in src/@types/
https://github.com/pagefaultgames/pokerogue/pull/5949 * Add depcruiser rule to enforce no non-type export in `src/@types` * Add missing field in config * Fixed type import inside `move.ts`
This commit is contained in:
parent
8afedc33d7
commit
6547e1d5ce
@ -1,6 +1,19 @@
|
||||
/** @type {import('dependency-cruiser').IConfiguration} */
|
||||
module.exports = {
|
||||
forbidden: [
|
||||
{
|
||||
name: "no-non-type-@type-exports",
|
||||
severity: "error",
|
||||
comment:
|
||||
"Files in @types should not export anything but types and interfaces. " +
|
||||
"The folder is intended to house imports that are removed at runtime, " +
|
||||
"and thus should not contain anything with a bearing on runtime code.",
|
||||
from: {},
|
||||
to: {
|
||||
path: "(^|/)src/@types",
|
||||
dependencyTypesNot: ["type-only"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "only-type-imports",
|
||||
severity: "error",
|
||||
|
@ -85,7 +85,7 @@ import { MoveEffectTrigger } from "#enums/MoveEffectTrigger";
|
||||
import { MultiHitType } from "#enums/MultiHitType";
|
||||
import { invalidAssistMoves, invalidCopycatMoves, invalidMetronomeMoves, invalidMirrorMoveMoves, invalidSleepTalkMoves, invalidSketchMoves } from "./invalid-moves";
|
||||
import { isVirtual, MoveUseMode } from "#enums/move-use-mode";
|
||||
import { ChargingMove, MoveAttrMap, MoveAttrString, MoveKindString, MoveClassMap } from "#app/@types/move-types";
|
||||
import type { ChargingMove, MoveAttrMap, MoveAttrString, MoveKindString, MoveClassMap } from "#app/@types/move-types";
|
||||
import { applyMoveAttrs } from "./apply-attrs";
|
||||
import { frenzyMissFunc, getMoveTargets } from "./move-utils";
|
||||
import { AbAttrBaseParams, AbAttrParamsWithCancel, PreAttackModifyPowerAbAttrParams } from "../abilities/ability";
|
||||
|
Loading…
Reference in New Issue
Block a user