From 67e3cd3f61ccdde7ffe938957f62bfb1ece42594 Mon Sep 17 00:00:00 2001 From: Long Nhat Nguyen Date: Thu, 22 Dec 2016 01:07:17 +0700 Subject: [PATCH 01/10] :fire: Remove coffeelint --- .coffeelintignore | 1 - coffeelint.json | 37 ------------------------------------- package.json | 3 +-- 3 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 .coffeelintignore delete mode 100644 coffeelint.json diff --git a/.coffeelintignore b/.coffeelintignore deleted file mode 100644 index 1db51fe..0000000 --- a/.coffeelintignore +++ /dev/null @@ -1 +0,0 @@ -spec/fixtures diff --git a/coffeelint.json b/coffeelint.json deleted file mode 100644 index a5dd715..0000000 --- a/coffeelint.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "max_line_length": { - "level": "ignore" - }, - "no_empty_param_list": { - "level": "error" - }, - "arrow_spacing": { - "level": "error" - }, - "no_interpolation_in_single_quotes": { - "level": "error" - }, - "no_debugger": { - "level": "error" - }, - "prefer_english_operator": { - "level": "error" - }, - "colon_assignment_spacing": { - "spacing": { - "left": 0, - "right": 1 - }, - "level": "error" - }, - "braces_spacing": { - "spaces": 0, - "level": "error" - }, - "spacing_after_comma": { - "level": "error" - }, - "no_stand_alone_at": { - "level": "error" - } -} diff --git a/package.json b/package.json index 7700d26..d8c0fa5 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,7 @@ "underscore-plus": "^1.0.0" }, "devDependencies": { - "atom-mocha-test-runner": "^0.3.0", - "coffeelint": "^1.9.7" + "atom-mocha-test-runner": "^0.3.0" }, "configSchema": { "useAlternateScoring": { From 8c0f77756621eeb9c72cae47a2eaeacead08ab0f Mon Sep 17 00:00:00 2001 From: Long Nhat Nguyen Date: Thu, 22 Dec 2016 01:09:06 +0700 Subject: [PATCH 02/10] Rename test folder into spec folder --- appveyor.yml | 8 ++++---- {test => spec}/command-palette-view.test.js | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename {test => spec}/command-palette-view.test.js (100%) diff --git a/appveyor.yml b/appveyor.yml index 2b0fde4..6856fdc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ -version: "{build}" - -platform: x64 +platform: + - x64 + - x86 branches: only: @@ -18,7 +18,7 @@ environment: - ATOM_CHANNEL: beta install: - - ps: Install-Product node 4 + - ps: Install-Product node 6 build_script: - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/atom/ci/master/build-package.ps1')) diff --git a/test/command-palette-view.test.js b/spec/command-palette-view.test.js similarity index 100% rename from test/command-palette-view.test.js rename to spec/command-palette-view.test.js From cc6ea3ac716152d1dc275ce92589e7af2cc24d1a Mon Sep 17 00:00:00 2001 From: Long Nhat Nguyen Date: Sat, 18 Feb 2017 09:30:23 +0700 Subject: [PATCH 03/10] Revert test folder --- {spec => test}/command-palette-view.test.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {spec => test}/command-palette-view.test.js (100%) diff --git a/spec/command-palette-view.test.js b/test/command-palette-view.test.js similarity index 100% rename from spec/command-palette-view.test.js rename to test/command-palette-view.test.js From 72993606594b4262264e7cd30d38063356e12b49 Mon Sep 17 00:00:00 2001 From: Long Nhat Nguyen Date: Sat, 18 Feb 2017 12:09:32 +0700 Subject: [PATCH 04/10] Only test on x64 [ci skip] --- appveyor.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6856fdc..772d948 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,4 @@ -platform: - - x64 - - x86 +platform: x64 branches: only: From add6338d0482d9cdc473ce250fb605c959d821e4 Mon Sep 17 00:00:00 2001 From: Long Nhat Nguyen Date: Sat, 18 Feb 2017 20:16:57 +0700 Subject: [PATCH 05/10] Using standard --- package.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d8c0fa5..a1792da 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,9 @@ "engines": { "atom": "*" }, + "scripts": { + "test": "standard lib/**/*.js test/**/*.js && atom --test test/*.test.js" + }, "atomTestRunner": "atom-mocha-test-runner", "dependencies": { "atom-select-list": "0.0.5", @@ -21,7 +24,8 @@ "underscore-plus": "^1.0.0" }, "devDependencies": { - "atom-mocha-test-runner": "^0.3.0" + "atom-mocha-test-runner": "^0.3.0", + "standard": "^8.6.0" }, "configSchema": { "useAlternateScoring": { @@ -34,5 +38,10 @@ "default": false, "description": "Preserve the last search when reopening the command palette." } + }, + "standard": { + "globals": [ + "atom" + ] } } From b7f8a8a893f0d4759a9092edeef0c49b14f177d8 Mon Sep 17 00:00:00 2001 From: Long Nhat Nguyen Date: Sat, 18 Feb 2017 20:39:28 +0700 Subject: [PATCH 06/10] Lint --- lib/command-palette-view.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/command-palette-view.js b/lib/command-palette-view.js index 43fcd23..f9812b9 100644 --- a/lib/command-palette-view.js +++ b/lib/command-palette-view.js @@ -5,6 +5,8 @@ import {humanizeKeystroke} from 'underscore-plus' import fuzzaldrin from 'fuzzaldrin' import fuzzaldrinPlus from 'fuzzaldrin-plus' +let CustomEvent + export default class CommandPaletteView { constructor () { this.keyBindingsForActiveElement = [] From 36079957672bc85d7be0161fd43e9594ab772eec Mon Sep 17 00:00:00 2001 From: Long Nhat Nguyen Date: Sun, 19 Feb 2017 00:21:48 +0700 Subject: [PATCH 07/10] Try fix lint --- lib/command-palette-view.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/command-palette-view.js b/lib/command-palette-view.js index f9812b9..713e8e5 100644 --- a/lib/command-palette-view.js +++ b/lib/command-palette-view.js @@ -5,8 +5,6 @@ import {humanizeKeystroke} from 'underscore-plus' import fuzzaldrin from 'fuzzaldrin' import fuzzaldrinPlus from 'fuzzaldrin-plus' -let CustomEvent - export default class CommandPaletteView { constructor () { this.keyBindingsForActiveElement = [] @@ -75,7 +73,7 @@ export default class CommandPaletteView { didConfirmSelection: (keyBinding) => { debugger this.hide() - const event = new CustomEvent(keyBinding.name, {bubbles: true, cancelable: true}) + let event = new CustomEvent(keyBinding.name, {bubbles: true, cancelable: true}) this.activeElement.dispatchEvent(event) }, didCancelSelection: () => { From 8846cd42181b3b734b9ecf397cd3b61c05b03f37 Mon Sep 17 00:00:00 2001 From: Long Nhat Nguyen Date: Sun, 19 Feb 2017 00:24:59 +0700 Subject: [PATCH 08/10] Try again --- lib/command-palette-view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/command-palette-view.js b/lib/command-palette-view.js index 713e8e5..9bbe801 100644 --- a/lib/command-palette-view.js +++ b/lib/command-palette-view.js @@ -5,6 +5,8 @@ import {humanizeKeystroke} from 'underscore-plus' import fuzzaldrin from 'fuzzaldrin' import fuzzaldrinPlus from 'fuzzaldrin-plus' +let event = new CustomEvent(keyBinding.name, {bubbles: true, cancelable: true}) + export default class CommandPaletteView { constructor () { this.keyBindingsForActiveElement = [] @@ -73,7 +75,6 @@ export default class CommandPaletteView { didConfirmSelection: (keyBinding) => { debugger this.hide() - let event = new CustomEvent(keyBinding.name, {bubbles: true, cancelable: true}) this.activeElement.dispatchEvent(event) }, didCancelSelection: () => { From 6740c7d2877f7f5d45faef8147869b49b75aa51b Mon Sep 17 00:00:00 2001 From: Long Nhat Nguyen Date: Sun, 19 Feb 2017 00:31:23 +0700 Subject: [PATCH 09/10] Try again 2 --- lib/command-palette-view.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/command-palette-view.js b/lib/command-palette-view.js index 9bbe801..f3d8fb1 100644 --- a/lib/command-palette-view.js +++ b/lib/command-palette-view.js @@ -5,8 +5,6 @@ import {humanizeKeystroke} from 'underscore-plus' import fuzzaldrin from 'fuzzaldrin' import fuzzaldrinPlus from 'fuzzaldrin-plus' -let event = new CustomEvent(keyBinding.name, {bubbles: true, cancelable: true}) - export default class CommandPaletteView { constructor () { this.keyBindingsForActiveElement = [] @@ -75,6 +73,7 @@ export default class CommandPaletteView { didConfirmSelection: (keyBinding) => { debugger this.hide() + let event = new CustomEvent(keyBinding.name, {bubbles: true, cancelable: true}); this.activeElement.dispatchEvent(event) }, didCancelSelection: () => { From bae3ea0851237feecfc90255d02c83719a7bb9f7 Mon Sep 17 00:00:00 2001 From: Long Nhat Nguyen Date: Sun, 19 Feb 2017 00:36:58 +0700 Subject: [PATCH 10/10] :smile: --- lib/command-palette-view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/command-palette-view.js b/lib/command-palette-view.js index f3d8fb1..2d23158 100644 --- a/lib/command-palette-view.js +++ b/lib/command-palette-view.js @@ -73,7 +73,8 @@ export default class CommandPaletteView { didConfirmSelection: (keyBinding) => { debugger this.hide() - let event = new CustomEvent(keyBinding.name, {bubbles: true, cancelable: true}); + let CustomEvent = window.CustomEvent + const event = new CustomEvent(keyBinding.name, {bubbles: true, cancelable: true}) this.activeElement.dispatchEvent(event) }, didCancelSelection: () => {