Skip to content

Commit

Permalink
update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaskasky committed Jan 23, 2025
1 parent 7bea0dc commit d9cebeb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
10 changes: 1 addition & 9 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,7 @@ export default tseslint.config(
'error',
{
alphabetize: { order: 'asc', caseInsensitive: true },
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
'object',
],
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
'newlines-between': 'never',
pathGroups: [
{
Expand Down
10 changes: 4 additions & 6 deletions tests/atomEffect.strict.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ it('should run the effect on mount and cleanup on unmount and whenever countAtom
})

function useTest() {
const [count, setCount] = useAtom(countAtom)
const [, setCount] = useAtom(countAtom)
useAtomValue(effectAtom)
return setCount
}
Expand Down Expand Up @@ -519,11 +519,9 @@ it('should abort the previous promise', async () => {
const completedRuns: number[] = []
const resolves: (() => void)[] = []
const countAtom = atom(0)
const abortControllerAtom = atom<{ abortController: AbortController | null }>(
{
abortController: null,
}
)
const abortControllerAtom = atom<{ abortController: AbortController | null }>({
abortController: null,
})
const effectAtom = atomEffect((get) => {
const currentRun = runCount++
get(countAtom)
Expand Down
5 changes: 1 addition & 4 deletions tests/withAtomEffect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,7 @@ describe('withAtomEffect', () => {

// reacts to changes to price
const priceAtom = withAtomEffect(atom(100), (get, set) => {
set(
discountAtom,
getNextDiscount(get.peek(unitPriceAtom), get(priceAtom))
)
set(discountAtom, getNextDiscount(get.peek(unitPriceAtom), get(priceAtom)))
})

const priceAndDiscount = atom((get) => ({
Expand Down

0 comments on commit d9cebeb

Please sign in to comment.