Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to typescript #50

Draft
wants to merge 55 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
ab73f01
feat: begin refactoring to TypeScript
kweeuhree Sep 16, 2024
f9b3aae
feat: add ListPath type
kweeuhree Sep 16, 2024
cf7ad59
feat: add types to all firebase functions
kweeuhree Sep 16, 2024
def133a
fix: change useAuth.jsx component extention to .tsx
kweeuhree Sep 16, 2024
872d8fc
each User type property can be a string and null;add types to useAuth
kweeuhree Sep 16, 2024
2082dee
fix: fix the way useShoppingLists takes props
kweeuhree Sep 16, 2024
c2f3988
fix: remove User type
kweeuhree Sep 16, 2024
77945a8
fix: remove redundant User type; use DocumentData type where needed
kweeuhree Sep 16, 2024
2e72f6a
add type to ManageList props
kweeuhree Sep 16, 2024
e48619d
fix: fix type of addItem function parameters
kweeuhree Sep 16, 2024
8d648a2
feat: add types to AddItems component; pass label prop to TextInputEl…
kweeuhree Sep 16, 2024
56736ac
feat: add types to TextInputElement component props, as well as patte…
kweeuhree Sep 16, 2024
172a520
feat: add type to List component props, pass items to AddItems component
kweeuhree Sep 16, 2024
cb2b2a9
feat: add types to normalizeItemName utility function
kweeuhree Sep 16, 2024
568b943
feat: add types to App component
kweeuhree Sep 16, 2024
7c2a158
fix: add fixes to AddItems component types
kweeuhree Sep 16, 2024
90bc64d
feat: add types to Home component
kweeuhree Sep 16, 2024
84845a4
fix: add fixes to ManageList component type
kweeuhree Sep 16, 2024
3ad80a5
fix: add fixes to List component type
kweeuhree Sep 16, 2024
95c0608
feat: add types to Layout component
kweeuhree Sep 16, 2024
c0d64d4
feat: add types to useStateWithStorage hook
kweeuhree Sep 16, 2024
1af02b2
fix: change main point of entry from jsx to tsx
kweeuhree Sep 16, 2024
4312d46
feat: add types to ListItem component
kweeuhree Sep 16, 2024
4b00780
feat: add types to RadioInputElement component
kweeuhree Sep 16, 2024
5f0a39d
feat: add types to SingleList component
kweeuhree Sep 16, 2024
9705ebd
feat: add types to ShareList component
kweeuhree Sep 16, 2024
69d3615
feat: add types to dates.js module
kweeuhree Sep 16, 2024
330b2d6
fix: adjust how parameters are being passed into functions
kweeuhree Sep 16, 2024
5fceeb1
fix: remove redundant file
kweeuhree Sep 16, 2024
26de591
fix: update listPath type to be either string or null
kweeuhree Sep 16, 2024
1a75fda
fix: add optional chaining operator to items List component
kweeuhree Sep 16, 2024
764ba25
fix[test]: update List component to take items prop
kweeuhree Sep 16, 2024
67e1b92
troubleshoot AddItems component
kweeuhree Sep 17, 2024
cc87268
troubleshoot listPath in Home, List and AddItems components
kweeuhree Sep 17, 2024
d57923a
fix: fixed listPath issue with passing listPath as a prop from App to…
kweeuhree Sep 17, 2024
8c395f0
fix: add listPath prop to List.test
kweeuhree Sep 17, 2024
4117b8e
fix: userId and userEmail can be undefined; update functions to retur…
kweeuhree Sep 19, 2024
640dae8
fix: add a try/catch block in index.ts to handle a case where root el…
kweeuhree Sep 19, 2024
1ae6c7a
fix: handle a case where listPath is null
kweeuhree Sep 19, 2024
ba9cc89
fix: resolved merge conflicts relevant to changes made in components …
kweeuhree Sep 26, 2024
ae9a2c8
feat: update firebase.ts:
kweeuhree Sep 26, 2024
705aee5
fix: use DocumentData type instead of custom User type
kweeuhree Sep 26, 2024
cbde328
fix: ensure that initialValue of useStateWithStorage hook cannot be n…
kweeuhree Sep 27, 2024
14f2c0c
fix: ensure type safety
kweeuhree Sep 27, 2024
b89e7ce
feat: remove Props type and add types inside the functions declaratio…
kweeuhree Sep 27, 2024
cd979cd
fix: instead of typing out every NavLink, map over navLinkOptions to …
kweeuhree Sep 27, 2024
edf3f70
feat: add exports to index.ts to keep imports shorter
kweeuhree Sep 27, 2024
b3a3335
fix: remove redundant JSDocs
kweeuhree Sep 27, 2024
21e73b2
fix: update imports props typing
kweeuhree Sep 27, 2024
c98404c
feat: abstract normalizing logic into normalize.ts and add listPath t…
kweeuhree Sep 27, 2024
6475150
fix: update the way props are typed to support intellisense hovers
kweeuhree Sep 27, 2024
8454367
fix: update imports and replace initial value from null to a string
kweeuhree Sep 27, 2024
5ec39f7
feat: add navigate to Home in case listPath is null
kweeuhree Sep 27, 2024
0400b4c
fix: add MemoryRouter to support useNavigate
kweeuhree Sep 27, 2024
b166e98
merge main branch
kweeuhree Oct 18, 2024
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
12 changes: 8 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended",
"prettier"
],
Expand All @@ -10,13 +10,17 @@
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"settings": { "react": { "version": "detect" } },
"rules": {
"react/react-in-jsx-scope": "off",
"no-duplicate-imports": "warn",
"no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"react/jsx-filename-extension": [1, { "allow": "as-needed" }],
"no-unused-vars": "warn",
"react/jsx-filename-extension": [1, { "extensions": [".tsx", ".jsx"] }],
"react/prop-types": "off",
"react/jsx-no-target-blank": "off"
}
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand All @@ -13,7 +13,7 @@
<link rel="icon" type="image/svg+xml" href="/src/favicon.ico" />
<meta name="color-scheme" content="dark light" />
<title>Smart Shopping List</title>
<script type="module" src="/src/index.jsx" async></script>
<script type="module" src="/src/index.tsx" async></script>
</head>
<body>
<div id="root"></div>
Expand Down
Loading
Loading