Skip to content

Commit 1110aa0

Browse files
committed
update to @epic-web/config
1 parent 40de345 commit 1110aa0

File tree

12 files changed

+955
-3082
lines changed

12 files changed

+955
-3082
lines changed

.vscode/extensions.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"recommendations": [
3-
"dbaeumer.vscode-eslint",
4-
"esbenp.prettier-vscode",
5-
"bradlc.vscode-tailwindcss",
6-
"neotan.vscode-auto-restart-typescript-eslint-servers",
7-
"prisma.prisma",
8-
"qwtel.sqlite-viewer"
9-
]
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"esbenp.prettier-vscode",
5+
"bradlc.vscode-tailwindcss",
6+
"neotan.vscode-auto-restart-typescript-eslint-servers",
7+
"prisma.prisma",
8+
"qwtel.sqlite-viewer"
9+
]
1010
}

epicshop/fix-watch.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ const debouncedRun = debounce(run, 200)
2020

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

epicshop/fix.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function exists(p) {
100100
try {
101101
fs.statSync(p)
102102
return true
103-
} catch (error) {
103+
} catch {
104104
return false
105105
}
106106
}

epicshop/tsconfig.json

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"include": ["**/*.ts", "**/*.tsx"],
3-
"compilerOptions": {
4-
"lib": ["ES2023"],
5-
"isolatedModules": true,
6-
"esModuleInterop": true,
7-
"module": "ES2022",
8-
"moduleResolution": "Bundler",
9-
"resolveJsonModule": true,
10-
"target": "ES2022",
11-
"strict": true,
12-
"noImplicitAny": true,
13-
"allowJs": true,
14-
"forceConsistentCasingInFileNames": true,
15-
"skipLibCheck": true,
16-
"allowImportingTsExtensions": true,
17-
"noEmit": true
18-
}
2+
"include": ["**/*.ts", "**/*.tsx"],
3+
"compilerOptions": {
4+
"lib": ["ES2023"],
5+
"isolatedModules": true,
6+
"esModuleInterop": true,
7+
"module": "ES2022",
8+
"moduleResolution": "Bundler",
9+
"resolveJsonModule": true,
10+
"target": "ES2022",
11+
"strict": true,
12+
"noImplicitAny": true,
13+
"allowJs": true,
14+
"forceConsistentCasingInFileNames": true,
15+
"skipLibCheck": true,
16+
"allowImportingTsExtensions": true,
17+
"noEmit": true
18+
}
1919
}

eslint.config.js

+13-37
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,14 @@
1-
/** @type {import('@types/eslint').Linter.Config} */
2-
export default {
3-
languageOptions: { parser: await import('@typescript-eslint/parser') },
4-
plugins: {
5-
'@typescript-eslint': (await import('@typescript-eslint/eslint-plugin'))
6-
.default,
7-
import: (await import('eslint-plugin-import')).default,
1+
import defaultConfig from '@epic-web/config/eslint'
2+
3+
/** @type {import("eslint").Linter.Config} */
4+
export default [
5+
{ ignores: ['**/babel-standalone.js'] },
6+
...defaultConfig,
7+
{
8+
rules: {
9+
// we leave unused vars around for the exercises
10+
'no-unused-vars': 'off',
11+
'@typescript-eslint/no-unused-vars': 'off',
12+
},
813
},
9-
ignores: ['node_modules', 'public/babel-standalone.js'],
10-
rules: {
11-
// playwright requires destructuring in fixtures even if you don't use anything 🤷‍♂️
12-
'no-empty-pattern': 'off',
13-
'@typescript-eslint/consistent-type-imports': [
14-
'warn',
15-
{
16-
prefer: 'type-imports',
17-
disallowTypeAnnotations: true,
18-
fixStyle: 'inline-type-imports',
19-
},
20-
],
21-
'import/no-duplicates': ['warn', { 'prefer-inline': true }],
22-
'import/consistent-type-specifier-style': ['warn', 'prefer-inline'],
23-
'import/order': [
24-
'warn',
25-
{
26-
alphabetize: { order: 'asc', caseInsensitive: true },
27-
groups: [
28-
'builtin',
29-
'external',
30-
'internal',
31-
'parent',
32-
'sibling',
33-
'index',
34-
],
35-
},
36-
],
37-
},
38-
}
14+
]

exercises/01.js-hello-world/01.problem.hello/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525

2626
<!-- 🐨 Append the div to the root div using `append` -->
2727
<!-- 💰 root.append(div) -->
28-
<!-- 📜 https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/append -->
28+
<!-- 📜 https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/append -->

exercises/07.forms/01.problem.form/README.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ for a new user. They'll need a username to start with, so let's just render that
55
and the submit button for now.
66

77
<callout-info>
8-
🦉 You may notice a full page refresh when you submit the form. We'll talk about
9-
this in a future step.
10-
</callout-info>
8+
🦉 You may notice a full page refresh when you submit the form. We'll talk
9+
about this in a future step.
10+
</callout-info>

exercises/07.forms/02.problem.action/README.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ the form data to the current page's URL. We can change this by adding an
2323
Go ahead and add an `action` attribute to the form element.
2424

2525
<callout-info>
26-
🦉 You may notice a full page refresh when you submit the form. We'll talk about
27-
this in a future step.
28-
</callout-info>
26+
🦉 You may notice a full page refresh when you submit the form. We'll talk
27+
about this in a future step.
28+
</callout-info>

exercises/07.forms/03.problem.types/README.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ For us, we need to add types for the password, photo, favorite color, and start
88
date. Please add inputs for those fields.
99

1010
<callout-info>
11-
🦉 You may notice a full page refresh when you submit the form. We'll talk about
12-
this in a future step.
13-
</callout-info>
11+
🦉 You may notice a full page refresh when you submit the form. We'll talk
12+
about this in a future step.
13+
</callout-info>

0 commit comments

Comments
 (0)