-
Notifications
You must be signed in to change notification settings - Fork 666
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f18e79f
commit 298e670
Showing
106 changed files
with
3,418 additions
and
1,835 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import fs from 'node:fs' | ||
import path from 'node:path' | ||
|
||
const exclude = [ | ||
'exercises/04.', | ||
'exercises/05.', | ||
'exercises/06.', | ||
'exercises/07.', | ||
] | ||
|
||
if (exclude.every(e => !process.env.EPICSHOP_PLAYGROUND_SRC_DIR.includes(e))) { | ||
fs.writeFileSync( | ||
path.join(process.env.EPICSHOP_PLAYGROUND_DEST_DIR, 'tsconfig.json'), | ||
JSON.stringify( | ||
{ | ||
include: ['**/*.ts', '**/*.tsx'], | ||
extends: ['@epic-web/config/typescript'], | ||
compilerOptions: { | ||
paths: { | ||
'#*': ['../shared/*'], | ||
}, | ||
}, | ||
}, | ||
null, | ||
2, | ||
), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,4 @@ | ||
{ | ||
"include": ["**/*.ts", "**/*.tsx", "**/*.js"], | ||
"compilerOptions": { | ||
"lib": ["ES2023"], | ||
"isolatedModules": true, | ||
"esModuleInterop": true, | ||
"module": "ES2022", | ||
"moduleResolution": "Bundler", | ||
"resolveJsonModule": true, | ||
"target": "ES2022", | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"allowJs": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"skipLibCheck": true, | ||
"allowImportingTsExtensions": true, | ||
"noEmit": true | ||
} | ||
} | ||
"include": ["@epic-web/config/reset.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"], | ||
"extends": ["@epic-web/config/typescript"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,13 @@ | ||
/** @type {import('@types/eslint').Linter.Config} */ | ||
export default { | ||
files: ['**/*.js', '**/*.ts', '**/*.tsx'], | ||
languageOptions: { parser: await import('@typescript-eslint/parser') }, | ||
plugins: { | ||
'@typescript-eslint': (await import('@typescript-eslint/eslint-plugin')) | ||
.default, | ||
'react-hooks': (await import('eslint-plugin-react-hooks')).default, | ||
import: (await import('eslint-plugin-import')).default, | ||
}, | ||
rules: { | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
import defaultConfig from '@epic-web/config/eslint' | ||
|
||
'@typescript-eslint/consistent-type-imports': [ | ||
'warn', | ||
{ | ||
prefer: 'type-imports', | ||
disallowTypeAnnotations: true, | ||
fixStyle: 'inline-type-imports', | ||
}, | ||
], | ||
'import/no-duplicates': ['warn', { 'prefer-inline': true }], | ||
'import/consistent-type-specifier-style': ['warn', 'prefer-inline'], | ||
'import/order': [ | ||
'warn', | ||
{ | ||
alphabetize: { order: 'asc', caseInsensitive: true }, | ||
groups: [ | ||
'builtin', | ||
'external', | ||
'internal', | ||
'parent', | ||
'sibling', | ||
'index', | ||
], | ||
}, | ||
], | ||
/** @type {import("eslint").Linter.Config} */ | ||
export default [ | ||
...defaultConfig, | ||
{ | ||
rules: { | ||
// we leave unused vars around for the exercises | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
}, | ||
}, | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
import '@total-typescript/ts-reset' | ||
import '@total-typescript/ts-reset/dom' | ||
|
||
import 'react' | ||
|
||
declare module 'react' { | ||
interface CSSProperties { | ||
[key: `--${string}`]: string | number | ||
} | ||
} | ||
import '@epic-web/config/reset.d.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
{ | ||
"include": ["**/*.ts", "**/*.tsx"], | ||
"extends": ["@epic-web/config/typescript"], | ||
"compilerOptions": { | ||
"lib": ["DOM", "DOM.Iterable", "ES2023"], | ||
"isolatedModules": true, | ||
"esModuleInterop": true, | ||
"jsx": "react-jsx", | ||
"module": "ES2022", | ||
"moduleResolution": "Bundler", | ||
"resolveJsonModule": true, | ||
"target": "ES2022", | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"allowJs": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"skipLibCheck": true, | ||
"allowImportingTsExtensions": true, | ||
"noEmit": true, | ||
"paths": { | ||
"#*": ["../../../shared/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
import '@total-typescript/ts-reset' | ||
import '@total-typescript/ts-reset/dom' | ||
|
||
import 'react' | ||
|
||
declare module 'react' { | ||
interface CSSProperties { | ||
[key: `--${string}`]: string | number | ||
} | ||
} | ||
import '@epic-web/config/reset.d.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
{ | ||
"include": ["**/*.ts", "**/*.tsx"], | ||
"extends": ["@epic-web/config/typescript"], | ||
"compilerOptions": { | ||
"lib": ["DOM", "DOM.Iterable", "ES2023"], | ||
"isolatedModules": true, | ||
"esModuleInterop": true, | ||
"jsx": "react-jsx", | ||
"module": "ES2022", | ||
"moduleResolution": "Bundler", | ||
"resolveJsonModule": true, | ||
"target": "ES2022", | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"allowJs": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"skipLibCheck": true, | ||
"allowImportingTsExtensions": true, | ||
"noEmit": true, | ||
"paths": { | ||
"#*": ["../../../shared/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
import '@total-typescript/ts-reset' | ||
import '@total-typescript/ts-reset/dom' | ||
|
||
import 'react' | ||
|
||
declare module 'react' { | ||
interface CSSProperties { | ||
[key: `--${string}`]: string | number | ||
} | ||
} | ||
import '@epic-web/config/reset.d.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
{ | ||
"include": ["**/*.ts", "**/*.tsx"], | ||
"extends": ["@epic-web/config/typescript"], | ||
"compilerOptions": { | ||
"lib": ["DOM", "DOM.Iterable", "ES2023"], | ||
"isolatedModules": true, | ||
"esModuleInterop": true, | ||
"jsx": "react-jsx", | ||
"module": "ES2022", | ||
"moduleResolution": "Bundler", | ||
"resolveJsonModule": true, | ||
"target": "ES2022", | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"allowJs": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"skipLibCheck": true, | ||
"allowImportingTsExtensions": true, | ||
"noEmit": true, | ||
"paths": { | ||
"#*": ["../../../shared/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
import '@total-typescript/ts-reset' | ||
import '@total-typescript/ts-reset/dom' | ||
|
||
import 'react' | ||
|
||
declare module 'react' { | ||
interface CSSProperties { | ||
[key: `--${string}`]: string | number | ||
} | ||
} | ||
import '@epic-web/config/reset.d.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
{ | ||
"include": ["**/*.ts", "**/*.tsx"], | ||
"extends": ["@epic-web/config/typescript"], | ||
"compilerOptions": { | ||
"lib": ["DOM", "DOM.Iterable", "ES2023"], | ||
"isolatedModules": true, | ||
"esModuleInterop": true, | ||
"jsx": "react-jsx", | ||
"module": "ES2022", | ||
"moduleResolution": "Bundler", | ||
"resolveJsonModule": true, | ||
"target": "ES2022", | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"allowJs": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"skipLibCheck": true, | ||
"allowImportingTsExtensions": true, | ||
"noEmit": true, | ||
"paths": { | ||
"#*": ["../../../shared/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
import '@total-typescript/ts-reset' | ||
import '@total-typescript/ts-reset/dom' | ||
|
||
import 'react' | ||
|
||
declare module 'react' { | ||
interface CSSProperties { | ||
[key: `--${string}`]: string | number | ||
} | ||
} | ||
import '@epic-web/config/reset.d.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
{ | ||
"include": ["**/*.ts", "**/*.tsx"], | ||
"extends": ["@epic-web/config/typescript"], | ||
"compilerOptions": { | ||
"lib": ["DOM", "DOM.Iterable", "ES2023"], | ||
"isolatedModules": true, | ||
"esModuleInterop": true, | ||
"jsx": "react-jsx", | ||
"module": "ES2022", | ||
"moduleResolution": "Bundler", | ||
"resolveJsonModule": true, | ||
"target": "ES2022", | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"allowJs": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"skipLibCheck": true, | ||
"allowImportingTsExtensions": true, | ||
"noEmit": true, | ||
"paths": { | ||
"#*": ["../../../shared/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
import '@total-typescript/ts-reset' | ||
import '@total-typescript/ts-reset/dom' | ||
|
||
import 'react' | ||
|
||
declare module 'react' { | ||
interface CSSProperties { | ||
[key: `--${string}`]: string | number | ||
} | ||
} | ||
import '@epic-web/config/reset.d.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
{ | ||
"include": ["**/*.ts", "**/*.tsx"], | ||
"extends": ["@epic-web/config/typescript"], | ||
"compilerOptions": { | ||
"lib": ["DOM", "DOM.Iterable", "ES2023"], | ||
"isolatedModules": true, | ||
"esModuleInterop": true, | ||
"jsx": "react-jsx", | ||
"module": "ES2022", | ||
"moduleResolution": "Bundler", | ||
"resolveJsonModule": true, | ||
"target": "ES2022", | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"allowJs": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"skipLibCheck": true, | ||
"allowImportingTsExtensions": true, | ||
"noEmit": true, | ||
"paths": { | ||
"#*": ["../../../shared/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
import '@total-typescript/ts-reset' | ||
import '@total-typescript/ts-reset/dom' | ||
|
||
import 'react' | ||
|
||
declare module 'react' { | ||
interface CSSProperties { | ||
[key: `--${string}`]: string | number | ||
} | ||
} | ||
import '@epic-web/config/reset.d.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
{ | ||
"include": ["**/*.ts", "**/*.tsx"], | ||
"extends": ["@epic-web/config/typescript"], | ||
"compilerOptions": { | ||
"lib": ["DOM", "DOM.Iterable", "ES2023"], | ||
"isolatedModules": true, | ||
"esModuleInterop": true, | ||
"jsx": "react-jsx", | ||
"module": "ES2022", | ||
"moduleResolution": "Bundler", | ||
"resolveJsonModule": true, | ||
"target": "ES2022", | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"allowJs": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"skipLibCheck": true, | ||
"allowImportingTsExtensions": true, | ||
"noEmit": true, | ||
"paths": { | ||
"#*": ["../../../shared/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
import '@total-typescript/ts-reset' | ||
import '@total-typescript/ts-reset/dom' | ||
|
||
import 'react' | ||
|
||
declare module 'react' { | ||
interface CSSProperties { | ||
[key: `--${string}`]: string | number | ||
} | ||
} | ||
import '@epic-web/config/reset.d.ts' |
Oops, something went wrong.