Forbid non type imports in type and enum files

This commit is contained in:
Sirz Benjie 2025-05-30 11:59:22 -05:00
parent 7859fea26b
commit 450a644f35
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -1,6 +1,17 @@
/** @type {import('dependency-cruiser').IConfiguration} */
module.exports = {
forbidden: [
{
name: "only-type-imports",
severity: "error",
comment: "Files in enums and @types may only use type imports.",
from: {
path: ["(^|/)src/@types", "(^|/)src/enums"],
},
to: {
dependencyTypesNot: ["type-only"],
},
},
{
name: "no-circular-at-runtime",
severity: "warn",