From: Eduardo San Martin Morote Date: Thu, 30 Sep 2021 08:20:56 +0000 (+0200) Subject: style: prettier X-Git-Tag: pinia@2.0.0-rc.10~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9b9678a19c363392f35e2867d0cd06fbf7a734f3;p=thirdparty%2Fvuejs%2Fpinia.git style: prettier --- diff --git a/packages/pinia/__tests__/store.spec.ts b/packages/pinia/__tests__/store.spec.ts index 88cbe4b9..b62686ba 100644 --- a/packages/pinia/__tests__/store.spec.ts +++ b/packages/pinia/__tests__/store.spec.ts @@ -350,7 +350,7 @@ describe('Store', () => { const useMyStore = defineStore({ id: 'arrowInit', state: () => new MyState(), - }); + }) useMyStore() expect('Detected constructor usage').toHaveBeenWarnedTimes(1) }) @@ -358,7 +358,7 @@ describe('Store', () => { it('does not warn when state is created with a plain object', () => { const useMyStore = defineStore({ id: 'poInit', - state: () => ({ someValue: undefined }) + state: () => ({ someValue: undefined }), }) useMyStore() expect('Detected constructor usage').toHaveBeenWarnedTimes(0) diff --git a/packages/pinia/src/store.ts b/packages/pinia/src/store.ts index f4f10e29..7c281038 100644 --- a/packages/pinia/src/store.ts +++ b/packages/pinia/src/store.ts @@ -681,7 +681,7 @@ function createSetupStore< !store.$state.constructor.toString().includes('[native code]') ) { console.warn( - `[🍍]: The "state" must be a plain object. It cannot be\n\tstate: () => new MyClass()` + `[🍍]: The "state" must be a plain object. It cannot be\n\tstate: () => new MyClass()` ) }