source: frontend/node_modules/@rushstack/eslint-patch/lib-commonjs/eslint-bulk-suppressions/cli/start.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.4 KB
Line 
1"use strict";
2// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3// See LICENSE in the project root for license information.
4Object.defineProperty(exports, "__esModule", { value: true });
5const prune_1 = require("./prune");
6const suppress_1 = require("./suppress");
7const is_correct_cwd_1 = require("./utils/is-correct-cwd");
8const print_help_1 = require("./utils/print-help");
9if (process.argv.includes('-h') || process.argv.includes('-H') || process.argv.includes('--help')) {
10 (0, print_help_1.printHelp)();
11 process.exit(0);
12}
13if (process.argv.length < 3) {
14 (0, print_help_1.printHelp)();
15 process.exit(1);
16}
17if (!(0, is_correct_cwd_1.isCorrectCwd)(process.cwd())) {
18 console.error('@rushstack/eslint-bulk: Please call this command from the directory that contains .eslintrc.js or .eslintrc.cjs');
19 process.exit(1);
20}
21const subcommand = process.argv[2];
22let processPromise;
23switch (subcommand) {
24 case 'suppress': {
25 processPromise = (0, suppress_1.suppressAsync)();
26 break;
27 }
28 case 'prune': {
29 processPromise = (0, prune_1.pruneAsync)();
30 break;
31 }
32 default: {
33 console.error('@rushstack/eslint-bulk: Unknown subcommand: ' + subcommand);
34 process.exit(1);
35 }
36}
37processPromise.catch((e) => {
38 if (e instanceof Error) {
39 console.error(e.message);
40 process.exit(1);
41 }
42 throw e;
43});
44//# sourceMappingURL=start.js.map
Note: See TracBrowser for help on using the repository browser.