-
Hey everyone, I'm trying to split dangerfile into small parts because we added many checks/automation so it's super helpful but it gets harder to manage it. but when I try to make it, it always gives me this error;
I really couldn't find any way to run it properly. Do you have any idea how it would work? This is my example to run;
|
Beta Was this translation helpful? Give feedback.
Answered by
fbartho
Sep 29, 2023
Replies: 1 comment 6 replies
-
As the error says, Danger JS uses globals under the hood - so you don't import from the danger module. You can just remove |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's an example from one of the repos I work on
Every file in
scripts/danger/lib
is imported into the Dangerfiles (main.ts/graphql.ts
)Each one starts with
import "./danger-import"
And the contents of
danger-import.ts
are: