Skip to content

Commit f22c45e

Browse files
committed
Lint cleanup
1 parent 329291e commit f22c45e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/service-module/service-module.actions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ export default function makeServiceActions(service) {
261261
const { idField, autoRemove } = state
262262

263263
list.forEach(item => {
264-
let id = getId(item, idField)
265-
let existingItem = state.keyedById[id]
264+
const id = getId(item, idField)
265+
const existingItem = state.keyedById[id]
266266

267267
if (id !== null && id !== undefined) {
268268
existingItem ? toUpdate.push(item) : toAdd.push(item)
@@ -305,8 +305,8 @@ export default function makeServiceActions(service) {
305305
*/
306306
async addOrUpdate({ state, commit }, item) {
307307
const { idField } = state
308-
let id = getId(item, idField)
309-
let existingItem = state.keyedById[id]
308+
const id = getId(item, idField)
309+
const existingItem = state.keyedById[id]
310310

311311
const isIdOk = id !== null && id !== undefined
312312

test/service-module/service-module.actions.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,19 @@ function makeContext() {
7979
})
8080
class Todo extends BaseModel {
8181
public static modelName = 'Todo'
82-
public static test: boolean = true
82+
public static test = true
8383
}
8484
class Task extends BaseModel {
8585
public static modelName = 'Task'
86-
public static test: boolean = true
86+
public static test = true
8787
}
8888
class NoId extends BaseModel {
8989
public static modelName = 'NoId'
90-
public static test: boolean = true
90+
public static test = true
9191
}
9292
class Broken extends BaseModel {
9393
public static modelName = 'Broken'
94-
public static test: boolean = true
94+
public static test = true
9595
}
9696
return {
9797
makeServicePlugin,
@@ -151,7 +151,7 @@ describe('Service Module - Actions', () => {
151151
assert(todoState.ids.length === 10, 'three ids populated')
152152
assert(todoState.errorOnFind === null, 'errorOnFind still null')
153153
assert(todoState.isFindPending === false, 'isFindPending is false')
154-
let expectedKeyedById: NumberedList = makeStore()
154+
const expectedKeyedById: NumberedList = makeStore()
155155
const currentKeyedById = JSON.parse(
156156
JSON.stringify(todoState.keyedById)
157157
)

0 commit comments

Comments
 (0)