Skip to content

Commit 0f01fb4

Browse files
onemenkentcdodds
authored andcommitted
native ESM + update dependencies (#118)
1 parent 1f152f6 commit 0f01fb4

File tree

94 files changed

+11119
-3633
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+11119
-3633
lines changed

.prettierrc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,15 @@
1616
"singleQuote": true,
1717
"tabWidth": 2,
1818
"trailingComma": "all",
19-
"useTabs": true
20-
}
19+
"useTabs": true,
20+
"overrides": [
21+
{
22+
"files": [
23+
"**/*.json"
24+
],
25+
"options": {
26+
"useTabs": false
27+
}
28+
}
29+
]
30+
}

examples/resetting-via-key-prop/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import * as React from 'react'
66
import * as ReactDOM from 'react-dom/client'
7-
import { Switch } from '~/shared/switch'
7+
import { Switch } from '~/shared/switch.tsx'
88

99
function callAll<Args extends Array<unknown>>(
1010
...fns: Array<((...args: Args) => unknown) | undefined>

exercises/01.latest-ref/01.solution/increments.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { waitFor, within } from '@testing-library/dom'
2-
import userEvent from '@testing-library/user-event'
2+
import { userEvent } from '~/shared/user-event.cjs'
33
import { expect, testStep } from '@kentcdodds/workshop-app/test'
44
import '.'
55

exercises/01.latest-ref/01.solution/step-change.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { waitFor, within, fireEvent } from '@testing-library/dom'
2-
import userEvent from '@testing-library/user-event'
2+
import { userEvent } from '~/shared/user-event.cjs'
33
import { expect, testStep } from '@kentcdodds/workshop-app/test'
44
import '.'
55

exercises/02.composition/01.problem/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react'
22
import * as ReactDOM from 'react-dom/client'
3-
import { allPokemon, PokemonDataView } from '~/shared/pokemon'
4-
import type { PokemonData, User } from '~/shared/types'
3+
import { allPokemon, PokemonDataView } from '~/shared/pokemon.tsx'
4+
import type { PokemonData, User } from '~/shared/types.tsx'
55

66
function App() {
77
const [user] = React.useState<User>({ name: 'Kody', image: '/img/kody.png' })
@@ -22,7 +22,7 @@ function App() {
2222
*/}
2323
<Nav user={user} />
2424
<div className="spacer" data-size="lg" />
25-
{/*
25+
{/*
2626
🐨 make Main accept ReactElement props called "sidebar" and "content"
2727
instead of the props it accepts right now.
2828
*/}

exercises/02.composition/01.solution/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react'
22
import * as ReactDOM from 'react-dom/client'
3-
import { allPokemon, PokemonDataView } from '~/shared/pokemon'
4-
import type { PokemonData, User } from '~/shared/types'
3+
import { allPokemon, PokemonDataView } from '~/shared/pokemon.tsx'
4+
import type { PokemonData, User } from '~/shared/types.tsx'
55

66
function App() {
77
const [user] = React.useState<User>({ name: 'Kody', image: '/img/kody.png' })

exercises/02.composition/01.solution/ui-still-works.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { within } from '@testing-library/dom'
2-
import userEvent from '@testing-library/user-event'
2+
import { userEvent } from '~/shared/user-event.cjs'
33
import { expect, testStep } from '@kentcdodds/workshop-app/test'
44
import '.'
55

exercises/03.compound-components/01.problem/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Toggle, ToggleOn, ToggleOff, ToggleButton } from './toggle'
1+
import { Toggle, ToggleOn, ToggleOff, ToggleButton } from './toggle.tsx'
22

33
export function App() {
44
return (

exercises/03.compound-components/01.problem/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as ReactDOM from 'react-dom/client'
2-
import { App } from './app'
2+
import { App } from './app.tsx'
33

44
const rootEl = document.createElement('div')
55
document.body.append(rootEl)

exercises/03.compound-components/01.problem/toggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import { Switch } from '~/shared/switch'
2+
import { Switch } from '~/shared/switch.tsx'
33

44
// 🐨 create your ToggleContext context here
55
// 📜 https://reactjs.org/docs/context.html#reactcreatecontext

0 commit comments

Comments
 (0)