1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Tools: Add class member accessibility modifiers and converted rule @typescript-eslint/explicit-member-accessibility to an error

This commit is contained in:
Laurent Cozic
2023-03-06 14:22:01 +00:00
parent aa4af69afc
commit c1db7182ac
129 changed files with 1252 additions and 1296 deletions

View File

@ -6,22 +6,22 @@ import Folder from '@joplin/lib/models/Folder';
import { FolderEntity } from '@joplin/lib/services/database/types';
class Command extends BaseCommand {
usage() {
public usage() {
return 'mkbook <new-notebook>';
}
description() {
public description() {
return _('Creates a new notebook.');
}
options() {
public options() {
return [
['-p, --parent <parent-notebook>', _('Create a new notebook under a parent notebook.')],
];
}
// validDestinationFolder check for presents and ambiguous folders
async validDestinationFolder(targetFolder: string) {
public async validDestinationFolder(targetFolder: string) {
const destinationFolder = await app().loadItem(BaseModel.TYPE_FOLDER, targetFolder);
if (!destinationFolder) {
@ -36,14 +36,14 @@ class Command extends BaseCommand {
return destinationFolder;
}
async saveAndSwitchFolder(newFolder: FolderEntity) {
public async saveAndSwitchFolder(newFolder: FolderEntity) {
const folder = await Folder.save(newFolder, { userSideValidation: true });
app().switchCurrentFolder(folder);
}
async action(args: any) {
public async action(args: any) {
const targetFolder = args.options.parent;
const newFolder: FolderEntity = {