Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
# testing
/coverage

# next.js
/.next/
/out/

# production
/dist
/build

# misc
Expand All @@ -26,7 +23,6 @@ npm-debug.log*

# typescript
*.tsbuildinfo
next-env.d.ts

#IDEs
.idea
Expand All @@ -37,8 +33,3 @@ next-env.d.ts
/playwright-report/
/blob-report/
/playwright/.cache/

# Jest
/coverage


4 changes: 2 additions & 2 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ export default {
'*.{js,jsx,ts,tsx}': [
'prettier --write',
'eslint --fix',
'jest --passWithNoTests',
'vitest related --run',
() => 'npm run typecheck',
],
'*.{json,css,scss,md}': ['prettier --write', 'eslint --fix'],
'*.{json,css,scss,md}': ['prettier --write'],
};
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ npm install
npm run dev
```

App runs at http://localhost:3000 (Vite).

Useful scripts:

- `npm run typecheck` — TypeScript check
- `npm test` — Vitest unit tests
- `npm run build` — production build to `dist/`
- `npm run e2e` — Playwright end-to-end tests

Deployed as a static Vite app on Vercel (`dist` output).

### Future Plans:

- [ ] handle todos in the codebase;
Expand Down
14 changes: 0 additions & 14 deletions app/layout.test.tsx

This file was deleted.

33 changes: 0 additions & 33 deletions app/layout.tsx

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions components.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"rsc": false,
"tsx": true,
"tailwind": {
"config": "",
"css": "app/globals.css",
"css": "src/styles/globals.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
Expand Down
66 changes: 52 additions & 14 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,54 @@
import { dirname } from 'path';
import { fileURLToPath } from 'url';
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import babelParser from '@babel/eslint-parser';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
});

const eslintConfig = [
...compat.extends('next/core-web-vitals', 'next/typescript'),
export default [
{
ignores: [
'dist',
'coverage',
'playwright-report',
'test-results',
'e2e-tests',
],
},
{
files: ['**/*.{js,mjs,cjs,ts,tsx}'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.browser,
...globals.node,
},
parser: babelParser,
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-typescript'],
plugins: [
['@babel/plugin-syntax-jsx', {}],
],
},
ecmaFeatures: { jsx: true },
},
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
// TypeScript handles unused locals; Babel parser can't distinguish type-only params.
'no-unused-vars': 'off',
'no-undef': 'off',
},
},
];

export default eslintConfig;
32 changes: 32 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!doctype html>
<html lang="en" class="dark" style="color-scheme: dark">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/icon.svg" />
<link rel="icon" type="image/png" href="/icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Event Loop Explorer</title>
<meta
name="description"
content="Simulate javascript execution in browser environment"
/>
<script>
(function () {
try {
var theme = localStorage.getItem('theme');
if (theme === 'light') {
document.documentElement.classList.remove('dark');
document.documentElement.style.colorScheme = 'light';
} else {
document.documentElement.classList.add('dark');
document.documentElement.style.colorScheme = 'dark';
}
} catch (_) {}
})();
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
24 changes: 0 additions & 24 deletions jest.config.js

This file was deleted.

15 changes: 0 additions & 15 deletions jest.setup.ts

This file was deleted.

7 changes: 0 additions & 7 deletions next.config.ts

This file was deleted.

Loading
Loading