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
{ | |
"layout": "dot", | |
"rankdir": "LR", | |
"fontName": "Courier", | |
"fontSize": "16", | |
"detectiveOptions": { | |
"es6": { | |
"skipTypeImports": true | |
}, | |
"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
const IntersectionObserverMock = vi.fn(() => ({ | |
disconnect: vi.fn(), | |
observe: vi.fn(), | |
takeRecords: vi.fn(), | |
unobserve: vi.fn(), | |
})) |
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
// vite.config.js | |
// import types for vitest config autocomplete | |
/// <reference types="vitest" /> | |
import { defineConfig } from 'vite'; | |
export default defineConfig({ | |
// assetsInclude: ['**/*.gltf', '**/*.glb', '**/*.m4a'], // additional asset types | |
// define: { |
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
{ | |
"$schema": "http://json.schemastore.org/prettierrc", | |
"arrowParens": "always", | |
"trailingComma": "es5", | |
"tabWidth": 2, | |
"semi": true, | |
"singleQuote": true, | |
"editorconfig": true, | |
"printWidth": 120 | |
} |
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
# Add any directories, files, or patterns you don't want to be tracked by version control | |
# Windows and OSX Specific System Files | |
.DS_Store | |
.DS_Store? | |
._* | |
.Spotlight-V100 | |
.Trashes | |
*.swp | |
ehthumbs.db |
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
{ | |
"root": true, | |
"env": { | |
"es2022": true, | |
"browser": true, | |
"node": true | |
}, | |
"parserOptions": { | |
"ecmaVersion": 2022, | |
"sourceType": "module" |
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
// global.d.ts | |
/// <reference types="vite/client" /> | |
// additional import types not included in vite/client | |
// declare module '*.m4a' { | |
// const src: string | |
// export default src | |
// } |
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
Show hidden characters
{ | |
"compilerOptions": { | |
/* Visit https://aka.ms/tsconfig to read more about this file */ | |
/* Projects */ | |
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ | |
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ | |
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ | |
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ | |
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ |
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
dist |
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
// see: https://twitter.com/diegohaz/status/1530662445240426496 | |
const anotherElement = document.querySelector('#anotherElement'); | |
function onClick() { | |
// BAD - Focus will fire on another element before the | |
// click event finishes bubbling. You may get events | |
// in the wrong order on parent elements. | |
anotherElement.focus(); |