| 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 { wrapWordsToLines } from './wrap-words-to-lines';
|
|---|
| 4 | export function printPruneHelp() {
|
|---|
| 5 | const help = `eslint-bulk prune
|
|---|
| 6 |
|
|---|
| 7 | Usage:
|
|---|
| 8 |
|
|---|
| 9 | eslint-bulk prune
|
|---|
| 10 |
|
|---|
| 11 | 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.`;
|
|---|
| 12 | const wrapped = wrapWordsToLines(help);
|
|---|
| 13 | for (const line of wrapped) {
|
|---|
| 14 | console.log(line);
|
|---|
| 15 | }
|
|---|
| 16 | }
|
|---|
| 17 | export function printHelp() {
|
|---|
| 18 | const help = `eslint-bulk <command>
|
|---|
| 19 |
|
|---|
| 20 | Usage:
|
|---|
| 21 |
|
|---|
| 22 | eslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...]
|
|---|
| 23 | eslint-bulk suppress --all PATH1 [PATH2...]
|
|---|
| 24 | eslint-bulk suppress --help
|
|---|
| 25 |
|
|---|
| 26 | eslint-bulk prune
|
|---|
| 27 | eslint-bulk prune --help
|
|---|
| 28 |
|
|---|
| 29 | eslint-bulk --help
|
|---|
| 30 |
|
|---|
| 31 | 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.
|
|---|
| 32 |
|
|---|
| 33 | Commands:
|
|---|
| 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 | }
|
|---|
| 47 | export function printSuppressHelp() {
|
|---|
| 48 | const help = `eslint-bulk suppress [options] <path...>
|
|---|
| 49 |
|
|---|
| 50 | Usage:
|
|---|
| 51 |
|
|---|
| 52 | eslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...]
|
|---|
| 53 | eslint-bulk suppress --all PATH1 [PATH2...]
|
|---|
| 54 | eslint-bulk suppress --help
|
|---|
| 55 |
|
|---|
| 56 | 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.
|
|---|
| 57 |
|
|---|
| 58 | Argument:
|
|---|
| 59 | <path...>
|
|---|
| 60 | Glob patterns for paths to suppress, same as eslint files argument. Should be relative to the project root.
|
|---|
| 61 |
|
|---|
| 62 | Options:
|
|---|
| 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 |
|---|