mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
Match linter rules (#229)
This commit is contained in:
parent
3b91a2c72b
commit
5a8de9be49
@ -44,7 +44,7 @@ export class SendProgram extends Program {
|
|||||||
return new program.Command('send')
|
return new program.Command('send')
|
||||||
.arguments('<data>')
|
.arguments('<data>')
|
||||||
.description('Work with Bitwarden sends. A Send can be quickly created using this command or subcommands can be used to fine-tune the Send', {
|
.description('Work with Bitwarden sends. A Send can be quickly created using this command or subcommands can be used to fine-tune the Send', {
|
||||||
data: 'The data to Send. Specify as a filepath with the --file option'
|
data: 'The data to Send. Specify as a filepath with the --file option',
|
||||||
})
|
})
|
||||||
.option('-f, --file', 'Specifies that <data> is a filepath')
|
.option('-f, --file', 'Specifies that <data> is a filepath')
|
||||||
.option('-d, --deleteInDays <days>', 'The number of days in the future to set deletion date, defaults to 7', '7')
|
.option('-d, --deleteInDays <days>', 'The number of days in the future to set deletion date, defaults to 7', '7')
|
||||||
@ -114,7 +114,7 @@ export class SendProgram extends Program {
|
|||||||
return new program.Command('template')
|
return new program.Command('template')
|
||||||
.arguments('<object>')
|
.arguments('<object>')
|
||||||
.description('Get json templates for send objects', {
|
.description('Get json templates for send objects', {
|
||||||
object: 'Valid objects are: send, send.text, send.file'
|
object: 'Valid objects are: send, send.text, send.file',
|
||||||
})
|
})
|
||||||
.action(async object => {
|
.action(async object => {
|
||||||
const cmd = new GetCommand(this.main.cipherService, this.main.folderService,
|
const cmd = new GetCommand(this.main.cipherService, this.main.folderService,
|
||||||
@ -188,7 +188,7 @@ export class SendProgram extends Program {
|
|||||||
return new program.Command('edit')
|
return new program.Command('edit')
|
||||||
.arguments('[encodedJson]')
|
.arguments('[encodedJson]')
|
||||||
.description('edit a Send', {
|
.description('edit a Send', {
|
||||||
encodedJson: 'Updated JSON object to save. If not provided, encodedJson is read from stdin.'
|
encodedJson: 'Updated JSON object to save. If not provided, encodedJson is read from stdin.',
|
||||||
})
|
})
|
||||||
.option('--itemid <itemid>', 'Overrides the itemId provided in [encodedJson]')
|
.option('--itemid <itemid>', 'Overrides the itemId provided in [encodedJson]')
|
||||||
.on('--help', () => {
|
.on('--help', () => {
|
||||||
@ -209,7 +209,7 @@ export class SendProgram extends Program {
|
|||||||
return new program.Command('delete')
|
return new program.Command('delete')
|
||||||
.arguments('<id>')
|
.arguments('<id>')
|
||||||
.description('delete a Send', {
|
.description('delete a Send', {
|
||||||
id: 'The id of the Send to delete.'
|
id: 'The id of the Send to delete.',
|
||||||
})
|
})
|
||||||
.action(async (id: string) => {
|
.action(async (id: string) => {
|
||||||
await this.exitIfLocked();
|
await this.exitIfLocked();
|
||||||
@ -223,7 +223,7 @@ export class SendProgram extends Program {
|
|||||||
return new program.Command('remove-password')
|
return new program.Command('remove-password')
|
||||||
.arguments('<id>')
|
.arguments('<id>')
|
||||||
.description('removes the saved password from a Send.', {
|
.description('removes the saved password from a Send.', {
|
||||||
id: 'The id of the Send to alter.'
|
id: 'The id of the Send to alter.',
|
||||||
})
|
})
|
||||||
.action(async (id: string) => {
|
.action(async (id: string) => {
|
||||||
await this.exitIfLocked();
|
await this.exitIfLocked();
|
||||||
@ -256,7 +256,7 @@ export class SendProgram extends Program {
|
|||||||
notes: options.notes,
|
notes: options.notes,
|
||||||
file: sendFile,
|
file: sendFile,
|
||||||
text: sendText,
|
text: sendText,
|
||||||
type: type
|
type: type,
|
||||||
});
|
});
|
||||||
|
|
||||||
return Buffer.from(JSON.stringify(template), 'utf8').toString('base64');
|
return Buffer.from(JSON.stringify(template), 'utf8').toString('base64');
|
||||||
|
12
tslint.json
12
tslint.json
@ -89,6 +89,18 @@
|
|||||||
"semicolon": [
|
"semicolon": [
|
||||||
true,
|
true,
|
||||||
"always"
|
"always"
|
||||||
|
],
|
||||||
|
"trailing-comma": [
|
||||||
|
true,
|
||||||
|
{
|
||||||
|
"multiline": {
|
||||||
|
"objects": "always",
|
||||||
|
"arrays": "always",
|
||||||
|
"functions": "ignore",
|
||||||
|
"typeLiterals": "ignore"
|
||||||
|
},
|
||||||
|
"singleline": "never"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user