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

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

Fix frontend appearance

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