forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dangerfile.ts
17 lines (14 loc) · 844 Bytes
/
dangerfile.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { danger, fail, warn, markdown, message } from 'danger';
import detectNonApprovedDependencies from './scripts/dangerjs/detectNonApprovedDependencies';
import checkChangelog from './scripts/dangerjs/checkChangelog';
import { checkStorybookVersions } from './scripts/dangerjs/checkStorybookVersions';
/**
* This trick (of explicitly passing Danger JS utils as function arg, instead of importing them at places where needed)
* is necessary due to the magic DangerJS is doing with imports: https://spectrum.chat/danger/javascript/danger-js-actually-runs-your-imports-as-globals~0a005b56-31ec-4919-9a28-ced623949d4d
*/
const dangerJS = { danger, fail, warn, markdown, message };
export default async () => {
await checkChangelog(dangerJS);
await detectNonApprovedDependencies(dangerJS);
await checkStorybookVersions(dangerJS);
};