Skip to content

Commit f0b80b8

Browse files
committed
format all the things
1 parent bc7556d commit f0b80b8

File tree

50 files changed

+25096
-25075
lines changed

Some content is hidden

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

50 files changed

+25096
-25075
lines changed

epicshop/fix-watch.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ const debouncedRun = debounce(run, 200)
2020

2121
// Add event listeners.
2222
watcher
23-
.on('addDir', path => {
23+
.on('addDir', (path) => {
2424
debouncedRun()
2525
})
26-
.on('unlinkDir', path => {
26+
.on('unlinkDir', (path) => {
2727
// Only act if path contains two slashes (excluding the leading `./`)
2828
debouncedRun()
2929
})
30-
.on('error', error => console.log(`Watcher error: ${error}`))
30+
.on('error', (error) => console.log(`Watcher error: ${error}`))
3131

3232
/**
3333
* Simple debounce implementation

epicshop/fix.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,29 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
99
const here = (...p) => path.join(__dirname, ...p)
1010

1111
const workshopRoot = here('..')
12-
const examples = (await readDir(here('../examples'))).map(dir =>
12+
const examples = (await readDir(here('../examples'))).map((dir) =>
1313
here(`../examples/${dir}`),
1414
)
1515
const exercises = (await readDir(here('../exercises')))
16-
.map(name => here(`../exercises/${name}`))
17-
.filter(filepath => fs.statSync(filepath).isDirectory())
16+
.map((name) => here(`../exercises/${name}`))
17+
.filter((filepath) => fs.statSync(filepath).isDirectory())
1818
const exerciseApps = (
1919
await Promise.all(
20-
exercises.flatMap(async exercise => {
20+
exercises.flatMap(async (exercise) => {
2121
return (await readDir(exercise))
22-
.filter(dir => {
22+
.filter((dir) => {
2323
return /(problem|solution)/.test(dir)
2424
})
25-
.map(dir => path.join(exercise, dir))
25+
.map((dir) => path.join(exercise, dir))
2626
}),
2727
)
2828
).flat()
29-
const exampleApps = (await readDir(here('../examples'))).map(dir =>
29+
const exampleApps = (await readDir(here('../examples'))).map((dir) =>
3030
here(`../examples/${dir}`),
3131
)
3232
const apps = [...exampleApps, ...exerciseApps]
3333

34-
const appsWithPkgJson = [...examples, ...apps].filter(app => {
34+
const appsWithPkgJson = [...examples, ...apps].filter((app) => {
3535
const pkgjsonPath = path.join(app, 'package.json')
3636
return exists(pkgjsonPath)
3737
})
@@ -67,7 +67,7 @@ async function updateTsconfig() {
6767
const tsconfig = {
6868
files: [],
6969
exclude: ['node_modules'],
70-
references: appsWithPkgJson.map(a => ({
70+
references: appsWithPkgJson.map((a) => ({
7171
path: relativeToWorkshopRoot(a).replace(/\\/g, '/'),
7272
})),
7373
}

0 commit comments

Comments
 (0)