Skip to content

Commit

Permalink
chore: fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Dec 3, 2024
1 parent 00c91e1 commit 0780d70
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 24 deletions.
10 changes: 2 additions & 8 deletions demos/lit-html/src/state/store.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ModelStore, StoreDispatch, StoreState } from '@captaincodeman/rdx'
import { createStore, devtools, persist } from '@captaincodeman/rdx'
import { createStore, persist } from '@captaincodeman/rdx'
import { config } from './config.js'

export type State = StoreState<typeof config>
Expand Down Expand Up @@ -44,11 +44,5 @@ export const store = (() => {
},
})

return () => {
if (window.Shaperone?.DEBUG === true) {
return devtools(store)
}

return store
}
return () => store
})()
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('models/forms/effects/replaceObjects', () => {

it('dispatches setPropertyObjects with pointers from resource graph', () => {
// given
const { dataset } = store.getState().resources.graph
const { dataset } = store.getState().resources.graph!
const property = propertyShape()
const focusNode = $rdf.clownface().blankNode()
const terms = [
Expand Down
7 changes: 0 additions & 7 deletions packages/core-tests/models/forms/reducers/editors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,6 @@ describe('core/models/forms/reducers/editors', () => {
}),
},
})
testState(state, {
focusNodes: {
...testFocusNodeState(focusNode, {
properties: [property],
}),
},
})
const editors = testEditorsState({
matchSingleEditors: () => [{
term: dash.TextFieldEditor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ describe('models/resources/effects/forms/addFormField', () => {

beforeEach(() => {
store = testStore()
formState = store.getState().form;
({ graph } = store.getState().resources)
formState = store.getState().form
graph = store.getState().resources.graph!
})

it('adds sh:defaultValue to graph', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ describe('models/resources/effects/forms/clearValue', () => {
let graph: AnyPointer

beforeEach(() => {
store = testStore();
({ graph } = store.getState().resources)
store = testStore()
graph = store.getState().resources.graph!
})

it('removes value from graph', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ describe('models/resources/effects/forms/createFocusNodeState', () => {

beforeEach(() => {
store = testStore()
formState = store.getState().form;
({ graph } = store.getState().resources)
formState = store.getState().form
graph = store.getState().resources.graph!
})

it('ensures defaultValue added to graph and object without default', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ describe('models/resources/effects/forms/removeObject', () => {
let graph: AnyPointer

beforeEach(() => {
store = testStore();
({ graph } = store.getState().resources)
store = testStore()
graph = store.getState().resources.graph!
})

it("removes object's value from dataset", () => {
Expand Down

0 comments on commit 0780d70

Please sign in to comment.