1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00
metamask-extension/development/fitness-functions/index.ts
Pedro Figueiredo 632ae0b7c3
Prevent new JS files in shared folder (#17737)
* Prevent new JS files in shared folder

* migrate to typescript

* fix types

* cleanup
2023-04-24 15:44:42 +01:00

12 lines
422 B
TypeScript

import { AUTOMATION_TYPE } from './common/constants';
import { getDiffByAutomationType } from './common/get-diff';
import { IRule, RULES, runFitnessFunctionRule } from './rules';
const automationType: AUTOMATION_TYPE = process.argv[2] as AUTOMATION_TYPE;
const diff = getDiffByAutomationType(automationType);
if (typeof diff === 'string') {
RULES.forEach((rule: IRule): void => runFitnessFunctionRule(rule, diff));
}