refactor: Lint for no unneeded backticks (#5057) (no-changelog)

*  Create rule `no-unneeded-backticks`

* 👕 Enable rule

*  Run rule on `cli`

*  Run rule on `core`

*  Run rule on `workflow`

*  Rule rule on `design-system`

*  Run rule on `node-dev`

*  Run rule on `editor-ui`

*  Run rule on `nodes-base`
This commit is contained in:
Iván Ovejero
2022-12-29 12:20:43 +01:00
committed by GitHub
parent a7868ae77d
commit d9b98fc8be
239 changed files with 772 additions and 714 deletions

View File

@@ -13,8 +13,8 @@ export class UpdateWorkflowCommand extends Command {
static description = 'Update workflows';
static examples = [
`$ n8n update:workflow --all --active=false`,
`$ n8n update:workflow --id=5 --active=true`,
'$ n8n update:workflow --all --active=false',
'$ n8n update:workflow --id=5 --active=true',
];
static flags = {
@@ -39,24 +39,24 @@ export class UpdateWorkflowCommand extends Command {
const { flags } = this.parse(UpdateWorkflowCommand);
if (!flags.all && !flags.id) {
console.info(`Either option "--all" or "--id" have to be set!`);
console.info('Either option "--all" or "--id" have to be set!');
return;
}
if (flags.all && flags.id) {
console.info(
`Either something else on top should be "--all" or "--id" can be set never both!`,
'Either something else on top should be "--all" or "--id" can be set never both!',
);
return;
}
const updateQuery: IDataObject = {};
if (flags.active === undefined) {
console.info(`No update flag like "--active=true" has been set!`);
console.info('No update flag like "--active=true" has been set!');
return;
}
if (!['false', 'true'].includes(flags.active)) {
console.info(`Valid values for flag "--active" are only "false" or "true"!`);
console.info('Valid values for flag "--active" are only "false" or "true"!');
return;
}
updateQuery.active = flags.active === 'true';