| 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.
|
|---|
| 4 | Object.defineProperty(exports, "__esModule", { value: true });
|
|---|
| 5 | exports.printPruneHelp = printPruneHelp;
|
|---|
| 6 | exports.printHelp = printHelp;
|
|---|
| 7 | exports.printSuppressHelp = printSuppressHelp;
|
|---|
| 8 | const wrap_words_to_lines_1 = require("./wrap-words-to-lines");
|
|---|
| 9 | function printPruneHelp() {
|
|---|
| 10 | const help = `eslint-bulk prune
|
|---|
| 11 |
|
|---|
| 12 | Usage:
|
|---|
| 13 |
|
|---|
| 14 | eslint-bulk prune
|
|---|
| 15 |
|
|---|
| 16 | This 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.`;
|
|---|
| 17 | const wrapped = (0, wrap_words_to_lines_1.wrapWordsToLines)(help);
|
|---|
| 18 | for (const line of wrapped) {
|
|---|
| 19 | console.log(line);
|
|---|
| 20 | }
|
|---|
| 21 | }
|
|---|
| 22 | function printHelp() {
|
|---|
| 23 | const help = `eslint-bulk <command>
|
|---|
| 24 |
|
|---|
| 25 | Usage:
|
|---|
| 26 |
|
|---|
| 27 | eslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...]
|
|---|
| 28 | eslint-bulk suppress --all PATH1 [PATH2...]
|
|---|
| 29 | eslint-bulk suppress --help
|
|---|
| 30 |
|
|---|
| 31 | eslint-bulk prune
|
|---|
| 32 | eslint-bulk prune --help
|
|---|
| 33 |
|
|---|
| 34 | eslint-bulk --help
|
|---|
| 35 |
|
|---|
| 36 | This 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.
|
|---|
| 37 |
|
|---|
| 38 | Commands:
|
|---|
| 39 | eslint-bulk suppress [options] <path...>
|
|---|
| 40 | 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.
|
|---|
| 41 | Please run "eslint-bulk suppress --help" to learn more.
|
|---|
| 42 |
|
|---|
| 43 | eslint-bulk prune
|
|---|
| 44 | Use this command to delete all unused suppression entries in all .eslint-bulk-suppressions.json files under the current working directory.
|
|---|
| 45 | Please run "eslint-bulk prune --help" to learn more.
|
|---|
| 46 | `;
|
|---|
| 47 | const wrapped = (0, wrap_words_to_lines_1.wrapWordsToLines)(help);
|
|---|
| 48 | for (const line of wrapped) {
|
|---|
| 49 | console.log(line);
|
|---|
| 50 | }
|
|---|
| 51 | }
|
|---|
| 52 | function printSuppressHelp() {
|
|---|
| 53 | const help = `eslint-bulk suppress [options] <path...>
|
|---|
| 54 |
|
|---|
| 55 | Usage:
|
|---|
| 56 |
|
|---|
| 57 | eslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...]
|
|---|
| 58 | eslint-bulk suppress --all PATH1 [PATH2...]
|
|---|
| 59 | eslint-bulk suppress --help
|
|---|
| 60 |
|
|---|
| 61 | This 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.
|
|---|
| 62 |
|
|---|
| 63 | Argument:
|
|---|
| 64 | <path...>
|
|---|
| 65 | Glob patterns for paths to suppress, same as eslint files argument. Should be relative to the project root.
|
|---|
| 66 |
|
|---|
| 67 | Options:
|
|---|
| 68 | -h, -H, --help
|
|---|
| 69 | Display this help message.
|
|---|
| 70 |
|
|---|
| 71 | -R, --rule
|
|---|
| 72 | The full name of the ESLint rule you want to bulk-suppress. Specify multiple rules with --rule NAME1 --rule RULENAME2.
|
|---|
| 73 |
|
|---|
| 74 | -A, --all
|
|---|
| 75 | Bulk-suppress all rules in the specified file patterns.`;
|
|---|
| 76 | const wrapped = (0, wrap_words_to_lines_1.wrapWordsToLines)(help);
|
|---|
| 77 | for (const line of wrapped) {
|
|---|
| 78 | console.log(line);
|
|---|
| 79 | }
|
|---|
| 80 | }
|
|---|
| 81 | //# sourceMappingURL=print-help.js.map |
|---|