@backstage/cli
Version:
CLI for developing Backstage plugins and apps
44 lines (40 loc) • 1.74 kB
JavaScript
var lazy = require('../../lib/lazy.cjs.js');
function registerPackageCommands(command) {
command.command("lint [directories...]").option(
"--format <format>",
"Lint report output format",
"eslint-formatter-friendly"
).option(
"--output-file <path>",
"Write the lint report to a file instead of stdout"
).option("--fix", "Attempt to automatically fix violations").option(
"--max-warnings <number>",
"Fail if more than this number of warnings. -1 allows warnings. (default: -1)"
).description("Lint a package").action(lazy.lazy(() => import('./commands/package/lint.cjs.js'), "default"));
}
function registerRepoCommands(command) {
command.command("lint").description("Lint all packages in the project").option(
"--format <format>",
"Lint report output format",
"eslint-formatter-friendly"
).option(
"--output-file <path>",
"Write the lint report to a file instead of stdout"
).option(
"--since <ref>",
"Only lint packages that changed since the specified ref"
).option(
"--successCache",
"Enable success caching, which skips running tests for unchanged packages that were successful in the previous run"
).option(
"--successCacheDir <path>",
"Set the success cache location, (default: node_modules/.cache/backstage-cli)"
).option(
"--max-warnings <number>",
"Fail if more than this number of warnings. -1 allows warnings. (default: -1)"
).option("--fix", "Attempt to automatically fix violations").action(lazy.lazy(() => import('./commands/repo/lint.cjs.js'), "command"));
}
exports.registerPackageCommands = registerPackageCommands;
exports.registerRepoCommands = registerRepoCommands;
//# sourceMappingURL=index.cjs.js.map
;