From e0ab0934259e3e915844f8d0a201df67fdc3731d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=B7=E6=B8=A1?= Date: Thu, 18 May 2023 09:17:59 +0800 Subject: [PATCH 1/2] fix eslint errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 迷渡 --- .../packages/runtime-core/src/__test__/index.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frameworks/packages/runtime-core/src/__test__/index.test.js b/frameworks/packages/runtime-core/src/__test__/index.test.js index 117112cb..af4633bc 100644 --- a/frameworks/packages/runtime-core/src/__test__/index.test.js +++ b/frameworks/packages/runtime-core/src/__test__/index.test.js @@ -66,7 +66,7 @@ describe('ViewModel', () => { expect(vm.count).toBe(1); const watcher = vm.$watch( () => vm.count, - (newValue,oldValue) => { + (newValue, oldValue) => { expect(oldValue).toBe(1); expect(newValue).toBe(2); watcher.unsubscribe(); @@ -88,7 +88,7 @@ describe('ViewModel', () => { const watcher = vm.$watch( () => vm.user.name, - (newName,oldName) => { + (newName, oldName) => { expect(oldName).toBe('Chen'); expect(newName).toBe('Chen2'); watcher.unsubscribe(); @@ -349,13 +349,13 @@ describe('ViewModel', () => { }, increaseB() { ++this.b; - }, + } }); const watcher = vm.$watch( () => vm.a + vm.b, number => { expect(number).toEqual(4); - watcher.unsubscribe() + watcher.unsubscribe(); done(); } ); @@ -364,7 +364,7 @@ describe('ViewModel', () => { () => vm.a + vm.b, number => { expect(number).toEqual(5); - watcher2.unsubscribe() + watcher2.unsubscribe(); done(); } ); -- Gitee From 332ec889d6a514dc50251c7e4d154e18f14a00ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=B7=E6=B8=A1?= Date: Thu, 18 May 2023 09:18:29 +0800 Subject: [PATCH 2/2] add lint task to package.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 迷渡 --- frameworks/packages/runtime-core/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/frameworks/packages/runtime-core/package.json b/frameworks/packages/runtime-core/package.json index b9d2f6b4..409b8d06 100755 --- a/frameworks/packages/runtime-core/package.json +++ b/frameworks/packages/runtime-core/package.json @@ -5,6 +5,7 @@ "main": "index.js", "scripts": { "build": "node scripts/build.js", + "lint": "eslint .", "test": "jest" }, "keywords": [], -- Gitee