Skip to content

Commit 52d776f

Browse files
committed
refactor: add typescript, breakdown into components
1 parent d6a0fb5 commit 52d776f

22 files changed

Lines changed: 1633 additions & 295 deletions

.gitignore

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,43 @@
1-
# Logs
2-
logs
3-
*.log
1+
# Dependencies
2+
/node_modules
3+
4+
# Build output
5+
/dist
6+
/build
7+
8+
# Debug / Logs
49
npm-debug.log*
510
yarn-debug.log*
611
yarn-error.log*
712
pnpm-debug.log*
813
lerna-debug.log*
914

10-
node_modules
11-
dist
12-
dist-ssr
13-
*.local
14-
15-
# Editor directories and files
15+
# Editor files
1616
.vscode/*
17-
!.vscode/extensions.json
17+
!.vscode/settings.json
1818
.idea
19-
.DS_Store
2019
*.suo
2120
*.ntvs*
2221
*.njsproj
2322
*.sln
2423
*.sw?
24+
25+
# Env files
26+
.env
27+
.env.local
28+
.env.development.local
29+
.env.test.local
30+
.env.production.local
31+
32+
# System files
33+
.DS_Store
34+
Thumbs.db
35+
36+
# Husky
37+
.husky/_
38+
39+
# TypeScript
40+
*.tsbuildinfo
41+
42+
# Coverage
43+
/coverage

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

eslint.config.js

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,38 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
5-
import { defineConfig, globalIgnores } from 'eslint/config'
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
import reactHooks from 'eslint-plugin-react-hooks';
4+
import reactRefresh from 'eslint-plugin-react-refresh';
5+
import tseslint from 'typescript-eslint';
6+
import prettierPlugin from 'eslint-plugin-prettier';
7+
import { defineConfig, globalIgnores } from 'eslint/config';
68

79
export default defineConfig([
8-
globalIgnores(['dist']),
10+
globalIgnores(['dist', 'node_modules']),
911
{
10-
files: ['**/*.{js,jsx}'],
11-
extends: [
12-
js.configs.recommended,
13-
reactHooks.configs['recommended-latest'],
14-
reactRefresh.configs.vite,
15-
],
12+
files: ['**/*.{js,jsx,ts,tsx}'],
1613
languageOptions: {
17-
ecmaVersion: 2020,
18-
globals: globals.browser,
14+
parser: tseslint.parser,
1915
parserOptions: {
2016
ecmaVersion: 'latest',
21-
ecmaFeatures: { jsx: true },
2217
sourceType: 'module',
18+
ecmaFeatures: { jsx: true },
2319
},
20+
globals: globals.browser,
21+
},
22+
plugins: {
23+
'@typescript-eslint': tseslint.plugin,
24+
prettier: prettierPlugin,
2425
},
26+
extends: [
27+
js.configs.recommended,
28+
...tseslint.configs.recommended,
29+
reactHooks.configs['recommended-latest'],
30+
reactRefresh.configs.vite,
31+
],
2532
rules: {
26-
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
33+
'no-unused-vars': 'off',
34+
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
35+
'prettier/prettier': ['error', { singleQuote: true }],
2736
},
2837
},
29-
])
38+
]);

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
5+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<link
88
rel="stylesheet"

0 commit comments

Comments
 (0)