Selaa lähdekoodia

tuning the tslint configuration to work with the editor code style. Also fixed the blatant linting issues in the editor code. ResourceOps.ts may need to be looked at to restructure since a tslint rule had to be forcibly disabled

Shaddock Heath 10 vuotta sitten
vanhempi
sitoutus
f1e6b3cd70

+ 1 - 1
Script/AtomicEditor/editor/Editor.ts

@@ -50,7 +50,7 @@ class Editor extends Atomic.ScriptObject {
         this.subscribeToEvent(EditorEvents.CloseProject, (data) => this.handleEditorCloseProject(data));
         this.subscribeToEvent("ProjectUnloaded", (data) => {
             Atomic.graphics.windowTitle = "AtomicEditor";
-            this.handleProjectUnloaded(data)
+            this.handleProjectUnloaded(data);
         });
 
         this.subscribeToEvent("IPCPlayerWindowChanged", (data) => {

+ 3 - 1
Script/AtomicEditor/resources/ResourceOps.ts

@@ -15,9 +15,11 @@ class ResourceOps extends Atomic.ScriptObject {
 
         this.subscribeToEvent("AssetImportError", (ev: ToolCore.AssetImportErrorEvent) => {
 
+            /* tslint:disable:no-use-before-declare */
             resourceOps.sendEvent(EditorEvents.ModalError, { title: "Asset Import Error", message: ev.error });
+            /* tslint:enable:no-use-before-declare*/
 
-        })
+        });
 
     }
 

+ 1 - 3
Script/AtomicEditor/ui/EditorStrings.ts

@@ -41,13 +41,11 @@ export class EditorString {
 
         var lookup = EditorString.lookup;
 
-        var lookup = EditorString.lookup;
-
         var shortcutKey;
         if (Atomic.platform == "MacOSX") {
             shortcutKey = "⌘";
         } else { // Windows and Linux
-            shortcutKey = "CTRL + "
+            shortcutKey = "CTRL + ";
         }
 
         lookup[StringID.RevealInFinder] = "Reveal in Finder";

+ 2 - 3
Script/AtomicEditor/ui/EditorUI.ts

@@ -81,12 +81,11 @@ class EditorUI extends Atomic.ScriptObject {
 
     this.subscribeToEvent(EditorEvents.ModalError, (event:EditorEvents.ModalErrorEvent) => {
       this.showModalError(event.title, event.message);
-    })
+    });
 
   }
 
-  showModalError(windowText:string, message:string)
-  {
+  showModalError(windowText:string, message:string) {
       var window = new Atomic.UIMessageWindow(this.view, "modal_error");
       window.show(windowText, message, Atomic.UI_MESSAGEWINDOW_SETTINGS_OK, true, 640, 360);
   }

+ 1 - 1
Script/AtomicEditor/ui/Shortcuts.ts

@@ -7,7 +7,7 @@
 
 import EditorEvents = require("../editor/EditorEvents");
 import EditorUI = require("./EditorUI");
-import Preferences = require("editor/Preferences")
+import Preferences = require("editor/Preferences");
 
 class Shortcuts extends Atomic.ScriptObject {
 

+ 2 - 2
Script/tslint.json

@@ -9,7 +9,7 @@
     "label-undefined": true,
     "max-line-length": false,
     "no-arg": true,
-    "no-bitwise": true,
+    "no-bitwise": false,
     "no-console": [true,
       "debug",
       "info",
@@ -21,7 +21,7 @@
     "no-debugger": true,
     "no-duplicate-key": true,
     "no-duplicate-variable": true,
-    "no-empty": true,
+    "no-empty": false,
     "no-eval": true,
     "no-imports": true,
     "no-string-literal": false,