Skip to content

Commit

Permalink
Merge pull request #29 from taxepfa/dev
Browse files Browse the repository at this point in the history
Update deps, improve linting, fix type errors
  • Loading branch information
icflorescu committed Oct 19, 2023
2 parents e887ffe + 3d34029 commit 5474d98
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "next/core-web-vitals"
"plugins": ["@typescript-eslint"],
"extends": ["next/core-web-vitals", "prettier", "plugin:@typescript-eslint/recommended"]
}
8 changes: 4 additions & 4 deletions components/InputCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ export function InputCard({ grossIncomeOverVATThreshold }: InputCardProps) {
ariaLabel="Moneda venitului"
data={CURRENCIES}
value={snap.incomeCurrency}
onChange={(val: string) => (state.incomeCurrency = val)}
onChange={(val) => (state.incomeCurrency = val!)}
/>
</GridCol>
<GridCol span={{ base: 6, xs: 3 }}>
<Select
ariaLabel="Intervalul pe care este estimat venitul"
data={INCOME_INTERVALS}
value={snap.incomeInterval}
onChange={(val: string) => (state.incomeInterval = val as IncomeInterval)}
onChange={(val) => (state.incomeInterval = val as IncomeInterval)}
/>
</GridCol>

Expand Down Expand Up @@ -129,15 +129,15 @@ export function InputCard({ grossIncomeOverVATThreshold }: InputCardProps) {
ariaLabel="Moneda cheltuielilor deductibile"
data={CURRENCIES}
value={snap.deductibleExpensesCurrency}
onChange={(val: string) => (state.deductibleExpensesCurrency = val)}
onChange={(val) => (state.deductibleExpensesCurrency = val!)}
/>
</GridCol>
<GridCol span={{ base: 6, xs: 3 }}>
<Select
ariaLabel="Intervalul pe care sunt estimate cheultuielile deductibile"
data={DEDUCTIBLE_EXPENSES_INTERVALS}
value={snap.deductibleExpensesInterval}
onChange={(val: string) => (state.deductibleExpensesInterval = val as DeductibleExpensesInterval)}
onChange={(val) => (state.deductibleExpensesInterval = val as DeductibleExpensesInterval)}
/>
</GridCol>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion components/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type SelectProps = {
withDescriptionSpace?: boolean;
data: (string | { value: string; label: string })[];
value: string;
onChange: (val: string) => void;
onChange: (val: string | null) => void;
};

export function Select({ ariaLabel, withDescriptionSpace, data, value, onChange }: SelectProps) {
Expand Down
2 changes: 1 addition & 1 deletion lib/taxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export type ChartDataPoint = {
export function useTaxesChart({ income, ...otherParams }: State) {
const { exchangeRates, exchangeRatesLoading } = useExchangeRates();

let data: ChartDataPoint[] = [];
const data: ChartDataPoint[] = [];

if (!exchangeRates || income === 0) return;

Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@
"@mantine/notifications": "^7.1.5",
"@tabler/icons-react": "^2.39.0",
"@types/node": "20.8.7",
"@types/react": "18.2.30",
"@types/react-dom": "18.2.14",
"@types/react": "18.2.30",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"clsx": "^2.0.0",
"eslint": "8.51.0",
"eslint-config-next": "13.5.6",
"eslint-config-prettier": "^9.0.0",
"eslint": "8.51.0",
"next": "13.5.6",
"postcss": "^8.4.31",
"postcss-preset-mantine": "1.9.0",
"postcss-simple-vars": "^7.0.1",
"react": "18.2.0",
"postcss": "^8.4.31",
"react-dom": "18.2.0",
"react": "18.2.0",
"recharts": "^2.9.0",
"swr": "^2.2.4",
"typescript": "5.2.2",
Expand Down
112 changes: 111 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -976,13 +976,18 @@
workbox-webpack-plugin "7.0.0"
workbox-window "7.0.0"

"@eslint-community/eslint-utils@^4.2.0":
"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
dependencies:
eslint-visitor-keys "^3.3.0"

"@eslint-community/regexpp@^4.5.1":
version "4.9.1"
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.1.tgz#449dfa81a57a1d755b09aa58d826c1262e4283b4"
integrity sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==

"@eslint-community/regexpp@^4.6.1":
version "4.8.1"
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.8.1.tgz#8c4bb756cc2aa7eaf13cfa5e69c83afb3260c20c"
Expand Down Expand Up @@ -1385,6 +1390,11 @@
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85"
integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==

"@types/json-schema@^7.0.12":
version "7.0.14"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.14.tgz#74a97a5573980802f32c8e47b663530ab3b6b7d1"
integrity sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==

"@types/json5@^0.0.29":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
Expand Down Expand Up @@ -1449,11 +1459,33 @@
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==

"@types/semver@^7.5.0":
version "7.5.4"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.4.tgz#0a41252ad431c473158b22f9bfb9a63df7541cff"
integrity sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==

"@types/trusted-types@^2.0.2":
version "2.0.4"
resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.4.tgz#2b38784cd16957d3782e8e2b31c03bc1d13b4d65"
integrity sha512-IDaobHimLQhjwsQ/NMwRVfa/yL7L/wriQPMhw1ZJall0KX6E1oxk29XMDeilW5qTIg5aoiqf5Udy8U/51aNoQQ==

"@typescript-eslint/eslint-plugin@^6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.8.0.tgz#06abe4265e7c82f20ade2dcc0e3403c32d4f148b"
integrity sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==
dependencies:
"@eslint-community/regexpp" "^4.5.1"
"@typescript-eslint/scope-manager" "6.8.0"
"@typescript-eslint/type-utils" "6.8.0"
"@typescript-eslint/utils" "6.8.0"
"@typescript-eslint/visitor-keys" "6.8.0"
debug "^4.3.4"
graphemer "^1.4.0"
ignore "^5.2.4"
natural-compare "^1.4.0"
semver "^7.5.4"
ts-api-utils "^1.0.1"

"@typescript-eslint/parser@^5.4.2 || ^6.0.0":
version "6.7.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.2.tgz#e0ae93771441b9518e67d0660c79e3a105497af4"
Expand All @@ -1465,6 +1497,17 @@
"@typescript-eslint/visitor-keys" "6.7.2"
debug "^4.3.4"

"@typescript-eslint/parser@^6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.8.0.tgz#bb2a969d583db242f1ee64467542f8b05c2e28cb"
integrity sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==
dependencies:
"@typescript-eslint/scope-manager" "6.8.0"
"@typescript-eslint/types" "6.8.0"
"@typescript-eslint/typescript-estree" "6.8.0"
"@typescript-eslint/visitor-keys" "6.8.0"
debug "^4.3.4"

"@typescript-eslint/scope-manager@6.7.2":
version "6.7.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.2.tgz#cf59a2095d2f894770c94be489648ad1c78dc689"
Expand All @@ -1473,11 +1516,34 @@
"@typescript-eslint/types" "6.7.2"
"@typescript-eslint/visitor-keys" "6.7.2"

"@typescript-eslint/scope-manager@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.8.0.tgz#5cac7977385cde068ab30686889dd59879811efd"
integrity sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==
dependencies:
"@typescript-eslint/types" "6.8.0"
"@typescript-eslint/visitor-keys" "6.8.0"

"@typescript-eslint/type-utils@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.8.0.tgz#50365e44918ca0fd159844b5d6ea96789731e11f"
integrity sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==
dependencies:
"@typescript-eslint/typescript-estree" "6.8.0"
"@typescript-eslint/utils" "6.8.0"
debug "^4.3.4"
ts-api-utils "^1.0.1"

"@typescript-eslint/types@6.7.2":
version "6.7.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.2.tgz#75a615a6dbeca09cafd102fe7f465da1d8a3c066"
integrity sha512-flJYwMYgnUNDAN9/GAI3l8+wTmvTYdv64fcH8aoJK76Y+1FCZ08RtI5zDerM/FYT5DMkAc+19E4aLmd5KqdFyg==

"@typescript-eslint/types@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.8.0.tgz#1ab5d4fe1d613e3f65f6684026ade6b94f7e3ded"
integrity sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==

"@typescript-eslint/typescript-estree@6.7.2":
version "6.7.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.2.tgz#ce5883c23b581a5caf878af641e49dd0349238c7"
Expand All @@ -1491,6 +1557,32 @@
semver "^7.5.4"
ts-api-utils "^1.0.1"

"@typescript-eslint/typescript-estree@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.8.0.tgz#9565f15e0cd12f55cf5aa0dfb130a6cb0d436ba1"
integrity sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==
dependencies:
"@typescript-eslint/types" "6.8.0"
"@typescript-eslint/visitor-keys" "6.8.0"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
semver "^7.5.4"
ts-api-utils "^1.0.1"

"@typescript-eslint/utils@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.8.0.tgz#d42939c2074c6b59844d0982ce26a51d136c4029"
integrity sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==
dependencies:
"@eslint-community/eslint-utils" "^4.4.0"
"@types/json-schema" "^7.0.12"
"@types/semver" "^7.5.0"
"@typescript-eslint/scope-manager" "6.8.0"
"@typescript-eslint/types" "6.8.0"
"@typescript-eslint/typescript-estree" "6.8.0"
semver "^7.5.4"

"@typescript-eslint/visitor-keys@6.7.2":
version "6.7.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.2.tgz#4cb2bd786f1f459731b0ad1584c9f73e1c7a4d5c"
Expand All @@ -1499,6 +1591,14 @@
"@typescript-eslint/types" "6.7.2"
eslint-visitor-keys "^3.4.1"

"@typescript-eslint/visitor-keys@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.8.0.tgz#cffebed56ae99c45eba901c378a6447b06be58b8"
integrity sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==
dependencies:
"@typescript-eslint/types" "6.8.0"
eslint-visitor-keys "^3.4.1"

"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5":
version "1.11.6"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24"
Expand Down Expand Up @@ -2495,6 +2595,11 @@ eslint-config-next@13.5.6:
eslint-plugin-react "^7.33.2"
eslint-plugin-react-hooks "^4.5.0 || 5.0.0-canary-7118f5dd7-20230705"

eslint-config-prettier@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz#eb25485946dd0c66cd216a46232dc05451518d1f"
integrity sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==

eslint-import-resolver-node@^0.3.6:
version "0.3.6"
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd"
Expand Down Expand Up @@ -3130,6 +3235,11 @@ ignore@^5.2.0:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a"
integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==

ignore@^5.2.4:
version "5.2.4"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==

import-fresh@^3.2.1:
version "3.3.0"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
Expand Down

0 comments on commit 5474d98

Please sign in to comment.