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

@@ -18,11 +18,11 @@ export class ExportCredentialsCommand extends Command {
static description = 'Export credentials';
static examples = [
`$ n8n export:credentials --all`,
`$ n8n export:credentials --id=5 --output=file.json`,
`$ n8n export:credentials --all --output=backups/latest.json`,
`$ n8n export:credentials --backup --output=backups/latest/`,
`$ n8n export:credentials --all --decrypted --output=backups/decrypted.json`,
'$ n8n export:credentials --all',
'$ n8n export:credentials --id=5 --output=file.json',
'$ n8n export:credentials --all --output=backups/latest.json',
'$ n8n export:credentials --backup --output=backups/latest/',
'$ n8n export:credentials --all --decrypted --output=backups/decrypted.json',
];
static flags = {
@@ -69,25 +69,25 @@ export class ExportCredentialsCommand extends Command {
}
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(`You should either use "--all" or "--id" but never both!`);
console.info('You should either use "--all" or "--id" but never both!');
return;
}
if (flags.separate) {
try {
if (!flags.output) {
console.info(`You must inform an output directory via --output when using --separate`);
console.info('You must inform an output directory via --output when using --separate');
return;
}
if (fs.existsSync(flags.output)) {
if (!fs.lstatSync(flags.output).isDirectory()) {
console.info(`The parameter --output must be a directory`);
console.info('The parameter --output must be a directory');
return;
}
} else {
@@ -106,7 +106,7 @@ export class ExportCredentialsCommand extends Command {
} else if (flags.output) {
if (fs.existsSync(flags.output)) {
if (fs.lstatSync(flags.output).isDirectory()) {
console.info(`The parameter --output must be a writeable file`);
console.info('The parameter --output must be a writeable file');
return;
}
}