mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user