浏览代码

picked lint

telamonian 5 年之前
父节点
当前提交
e46395ccec

+ 5 - 5
packages/application-extension/src/index.tsx

@@ -35,7 +35,7 @@ import { ISettingRegistry } from '@jupyterlab/settingregistry';
 
 import { IStateDB } from '@jupyterlab/statedb';
 
-import { buildIcon } from "@jupyterlab/ui-components";
+import { buildIcon } from '@jupyterlab/ui-components';
 
 import { each, iter, toArray } from '@lumino/algorithm';
 
@@ -607,7 +607,7 @@ function addCommands(app: JupyterLab, palette: ICommandPalette): void {
   commands.addCommand(CommandIDs.close, {
     label: () => 'Close Tab',
     isEnabled: () =>
-      !!shell.currentWidget && !!shell.currentWidget.title.closable,
+      !!shell.currentWidget && shell.currentWidget.title.closable,
     execute: () => {
       if (shell.currentWidget) {
         shell.currentWidget.close();
@@ -675,7 +675,7 @@ function addCommands(app: JupyterLab, palette: ICommandPalette): void {
   });
 
   app.commands.addCommand(CommandIDs.toggleLeftArea, {
-    label: args => 'Show Left Sidebar',
+    label: () => 'Show Left Sidebar',
     execute: () => {
       if (shell.leftCollapsed) {
         shell.expandLeft();
@@ -692,7 +692,7 @@ function addCommands(app: JupyterLab, palette: ICommandPalette): void {
   palette.addItem({ command: CommandIDs.toggleLeftArea, category });
 
   app.commands.addCommand(CommandIDs.toggleRightArea, {
-    label: args => 'Show Right Sidebar',
+    label: () => 'Show Right Sidebar',
     execute: () => {
       if (shell.rightCollapsed) {
         shell.expandRight();
@@ -709,7 +709,7 @@ function addCommands(app: JupyterLab, palette: ICommandPalette): void {
   palette.addItem({ command: CommandIDs.toggleRightArea, category });
 
   app.commands.addCommand(CommandIDs.togglePresentationMode, {
-    label: args => 'Presentation Mode',
+    label: () => 'Presentation Mode',
     execute: () => {
       shell.presentationMode = !shell.presentationMode;
     },

+ 1 - 3
packages/application-extension/tsconfig.json

@@ -4,9 +4,7 @@
     "outDir": "lib",
     "rootDir": "src"
   },
-  "include": [
-    "src/*"
-  ],
+  "include": ["src/*"],
   "references": [
     {
       "path": "../application"

+ 1 - 6
packages/extensionmanager-extension/src/index.ts

@@ -13,7 +13,6 @@ import { IMainMenu } from '@jupyterlab/mainmenu';
 import { ISettingRegistry } from '@jupyterlab/settingregistry';
 import { extensionIcon } from '@jupyterlab/ui-components';
 
-
 /**
  * IDs of the commands added by this extension.
  */
@@ -130,11 +129,7 @@ namespace Private {
         Dialog.warnButton({ label: 'Enable' })
       ]
     }).then(result => {
-      if (result.button.accept) {
-        return true;
-      } else {
-        return false;
-      }
+      return result.button.accept;
     });
   }
 }