|
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.
|
|---|
| 3 | import { pruneAsync } from './prune';
|
|---|
| 4 | import { suppressAsync } from './suppress';
|
|---|
| 5 | import { isCorrectCwd } from './utils/is-correct-cwd';
|
|---|
| 6 | import { printHelp } from './utils/print-help';
|
|---|
| 7 | if (process.argv.includes('-h') || process.argv.includes('-H') || process.argv.includes('--help')) {
|
|---|
| 8 | printHelp();
|
|---|
| 9 | process.exit(0);
|
|---|
| 10 | }
|
|---|
| 11 | if (process.argv.length < 3) {
|
|---|
| 12 | printHelp();
|
|---|
| 13 | process.exit(1);
|
|---|
| 14 | }
|
|---|
| 15 | if (!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 | }
|
|---|
| 19 | const subcommand = process.argv[2];
|
|---|
| 20 | let processPromise;
|
|---|
| 21 | switch (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 | }
|
|---|
| 35 | processPromise.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.