mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-17 15:25:22 +01:00
Added lefthook to enforce no non-type export in src/@types
This commit is contained in:
parent
88e4ab978b
commit
f3f746ebdc
@ -1,6 +1,18 @@
|
|||||||
/** @type {import('dependency-cruiser').IConfiguration} */
|
/** @type {import('dependency-cruiser').IConfiguration} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
forbidden: [
|
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.",
|
||||||
|
to: {
|
||||||
|
path: "(^|/)src/@types",
|
||||||
|
dependencyTypesNot: ["type-only"],
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "only-type-imports",
|
name: "only-type-imports",
|
||||||
severity: "error",
|
severity: "error",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user