source: frontend/node_modules/@rushstack/eslint-patch/lib-esm/eslint-bulk-suppressions/cli/utils/print-help.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: 2.7 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 { wrapWordsToLines } from './wrap-words-to-lines';
4export function printPruneHelp() {
5 const help = `eslint-bulk prune
6
7Usage:
8
9eslint-bulk prune
10
11This command is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to delete all unused suppression entries in all .eslint-bulk-suppressions.json files under the current working directory.`;
12 const wrapped = wrapWordsToLines(help);
13 for (const line of wrapped) {
14 console.log(line);
15 }
16}
17export function printHelp() {
18 const help = `eslint-bulk <command>
19
20Usage:
21
22eslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...]
23eslint-bulk suppress --all PATH1 [PATH2...]
24eslint-bulk suppress --help
25
26eslint-bulk prune
27eslint-bulk prune --help
28
29eslint-bulk --help
30
31This command line tool is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to suppress or prune unused suppressions in the local .eslint-bulk-suppressions.json file.
32
33Commands:
34 eslint-bulk suppress [options] <path...>
35 Use this command to generate a new .eslint-bulk-suppressions.json file or add suppression entries to the existing file. Specify the files and rules you want to suppress.
36 Please run "eslint-bulk suppress --help" to learn more.
37
38 eslint-bulk prune
39 Use this command to delete all unused suppression entries in all .eslint-bulk-suppressions.json files under the current working directory.
40 Please run "eslint-bulk prune --help" to learn more.
41`;
42 const wrapped = wrapWordsToLines(help);
43 for (const line of wrapped) {
44 console.log(line);
45 }
46}
47export function printSuppressHelp() {
48 const help = `eslint-bulk suppress [options] <path...>
49
50Usage:
51
52eslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...]
53eslint-bulk suppress --all PATH1 [PATH2...]
54eslint-bulk suppress --help
55
56This command is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to either generate a new .eslint-bulk-suppressions.json file or add suppression entries to the existing file. Specify the files and rules you want to suppress.
57
58Argument:
59 <path...>
60 Glob patterns for paths to suppress, same as eslint files argument. Should be relative to the project root.
61
62Options:
63 -h, -H, --help
64 Display this help message.
65
66 -R, --rule
67 The full name of the ESLint rule you want to bulk-suppress. Specify multiple rules with --rule NAME1 --rule RULENAME2.
68
69 -A, --all
70 Bulk-suppress all rules in the specified file patterns.`;
71 const wrapped = wrapWordsToLines(help);
72 for (const line of wrapped) {
73 console.log(line);
74 }
75}
76//# sourceMappingURL=print-help.js.map
Note: See TracBrowser for help on using the repository browser.