Skip to content

Commit

Permalink
fix: eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rfviolato committed Jan 18, 2024
1 parent cf678ce commit a4ac0d3
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 169 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"@fortawesome/react-fontawesome": "^0.1.18",
"@rfviolato/private-registry": "1.0.0",
"animejs": "^3.1.0",
"apollo-boost": "^0.4.4",
"graphql": "^16.8.1",
"graphql-tag": "^2.12.6",
"lodash.debounce": "^4.0.8",
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Averages/query.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { gql } from 'apollo-boost';
import gql from "graphql-tag";

export default gql`
query getAveragesFromPeriod($periodStart: String!, $periodEnd: String!) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/DayTimetable/query.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { gql } from 'apollo-boost';
import { gql } from "graphql-tag";

export default gql`
query getDayTimetable($day: String!) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/DayTotal/query.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { gql } from 'apollo-boost';
import gql from "graphql-tag";

export default gql`
query getDayTotals($day: String!) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/MonthPicker/query.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { gql } from 'apollo-boost';
import { gql } from "graphql-tag";

export default gql`
query getFirstRecord {
Expand Down
16 changes: 9 additions & 7 deletions src/app/components/PeriodBarChart/carousel-chart.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import { Slider } from '../Slider';
import { BarsContainer } from './styled';
import { ICarouselChartProps } from './interface';
import React from "react";
import { Slider } from "../Slider";
import { BarsContainer } from "./styled";
import { ICarouselChartProps } from "./interface";

export const BARS_PER_PAGE = 5;
export const SLIDER_SPEED = 800;
const SLIDER_EASING = 'cubic-bezier(0.645, 0.045, 0.355, 1)'; // easeInOutCubic
const SLIDER_EASING = "cubic-bezier(0.645, 0.045, 0.355, 1)"; // easeInOutCubic

const CarouselChartComponent = React.forwardRef<any, ICarouselChartProps>(
(props, ref) => {
Expand All @@ -24,7 +24,7 @@ const CarouselChartComponent = React.forwardRef<any, ICarouselChartProps>(
{chartData
.slice(
currentPage * BARS_PER_PAGE - BARS_PER_PAGE,
currentPage * BARS_PER_PAGE,
currentPage * BARS_PER_PAGE
)
.map(renderChartBars)}
</BarsContainer>
Expand All @@ -43,7 +43,9 @@ const CarouselChartComponent = React.forwardRef<any, ICarouselChartProps>(
{slides}
</Slider>
);
},
}
);

CarouselChartComponent.displayName = "CarouselChart";

export const CarouselChart = React.memo(CarouselChartComponent);
22 changes: 12 additions & 10 deletions src/app/components/PeriodBarChart/chart-bar.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import { formatMinutes, getBarHeight, getTotalMinutesFromTime } from './utils';
import { formatMinutes, getBarHeight, getTotalMinutesFromTime } from "./utils";
import {
BarChartXValue,
BarChartYValueLabel,
BarContainer,
BarRectangle,
BarRectangleContainer,
DIMENSIONS,
} from './styled';
import { ANIMATION_IDS } from './animations';
import moment from 'moment';
import React from 'react';
import { IChartBarProps } from './interface';
} from "./styled";
import { ANIMATION_IDS } from "./animations";
import moment from "moment";
import React from "react";
import { IChartBarProps } from "./interface";

export const ChartBar = React.forwardRef<any, IChartBarProps>(
(
{ day, hours, minutes, chartDataMaxYValue, barWidth, isMobileView },
ref,
ref
) => {
const totalMinutes = getTotalMinutesFromTime({ hours, minutes });
const shouldDisplayYValue = !(hours === 0 && minutes < 30);
const height = getBarHeight(
DIMENSIONS.CHART_HEIGHT,
chartDataMaxYValue,
totalMinutes,
totalMinutes
);

return (
Expand All @@ -46,9 +46,11 @@ export const ChartBar = React.forwardRef<any, IChartBarProps>(
data-animation-id={ANIMATION_IDS.BAR_X_VALUE_LABEL}
isMobile={isMobileView}
>
{moment(day).format('DD/MM')}
{moment(day).format("DD/MM")}
</BarChartXValue>
</BarContainer>
);
},
}
);

ChartBar.displayName = "ChartBar";
2 changes: 1 addition & 1 deletion src/app/components/PeriodBarChart/query.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { gql } from 'apollo-boost';
import gql from "graphql-tag";

export default gql`
query getPeriod($periodStart: String!, $periodEnd: String!) {
Expand Down
150 changes: 4 additions & 146 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@
"@types/node" "*"
form-data "^4.0.0"

"@types/node@*", "@types/node@>=6", "@types/node@^20":
"@types/node@*", "@types/node@^20":
version "20.11.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.0.tgz#8e0b99e70c0c1ade1a86c4a282f7b7ef87c9552f"
integrity sha512-o9bjXmDNcF7GbM4CNQpmi+TutCgap/K3w1JyKgxAjqx41zp9qlIAVFi0IhCNsJcXolEqLWhbFbEeL0PvYm4pcQ==
Expand Down Expand Up @@ -818,11 +818,6 @@
dependencies:
"@types/webidl-conversions" "*"

"@types/zen-observable@^0.8.0":
version "0.8.7"
resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.7.tgz#114e2ffc8d5be4915fdd5bc90668fc0ceaadb760"
integrity sha512-LKzNTjj+2j09wAo/vvVjzgw5qckJJzhdGgWHW7j69QIGdq/KnZrMAMIHQiWGl3Ccflh5/CudBAntTPYdprPltA==

"@typescript-eslint/parser@^5.4.2 || ^6.0.0":
version "6.18.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.18.1.tgz#3c3987e186b38c77b30b6bfa5edf7c98ae2ec9d3"
Expand Down Expand Up @@ -881,28 +876,13 @@
dependencies:
tslib "^2.3.0"

"@wry/context@^0.4.0":
version "0.4.4"
resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.4.4.tgz#e50f5fa1d6cfaabf2977d1fda5ae91717f8815f8"
integrity sha512-LrKVLove/zw6h2Md/KZyWxIkFM6AoyKp71OqpH9Hiip1csjPVoD3tPxlbQUNxEnHENks3UGgNpSBCAfq9KWuag==
dependencies:
"@types/node" ">=6"
tslib "^1.9.3"

"@wry/context@^0.7.0":
version "0.7.4"
resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.7.4.tgz#e32d750fa075955c4ab2cfb8c48095e1d42d5990"
integrity sha512-jmT7Sb4ZQWI5iyu3lobQxICu2nC/vbUhP0vIdd6tHC9PTfenmRmuIFqktc6GH9cgi+ZHnsLWPvfSvc4DrYmKiQ==
dependencies:
tslib "^2.3.0"

"@wry/equality@^0.1.2":
version "0.1.11"
resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.11.tgz#35cb156e4a96695aa81a9ecc4d03787bc17f1790"
integrity sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA==
dependencies:
tslib "^1.9.3"

"@wry/equality@^0.5.6":
version "0.5.7"
resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.5.7.tgz#72ec1a73760943d439d56b7b1e9985aec5d497bb"
Expand Down Expand Up @@ -976,101 +956,6 @@ ansi-styles@^4.1.0:
dependencies:
color-convert "^2.0.1"

apollo-boost@^0.4.4:
version "0.4.9"
resolved "https://registry.yarnpkg.com/apollo-boost/-/apollo-boost-0.4.9.tgz#ab3ba539c2ca944e6fd156583a1b1954b17a6791"
integrity sha512-05y5BKcDaa8w47f8d81UVwKqrAjn8uKLv6QM9fNdldoNzQ+rnOHgFlnrySUZRz9QIT3vPftQkEz2UEASp1Mi5g==
dependencies:
apollo-cache "^1.3.5"
apollo-cache-inmemory "^1.6.6"
apollo-client "^2.6.10"
apollo-link "^1.0.6"
apollo-link-error "^1.0.3"
apollo-link-http "^1.3.1"
graphql-tag "^2.4.2"
ts-invariant "^0.4.0"
tslib "^1.10.0"

apollo-cache-inmemory@^1.6.6:
version "1.6.6"
resolved "https://registry.yarnpkg.com/apollo-cache-inmemory/-/apollo-cache-inmemory-1.6.6.tgz#56d1f2a463a6b9db32e9fa990af16d2a008206fd"
integrity sha512-L8pToTW/+Xru2FFAhkZ1OA9q4V4nuvfoPecBM34DecAugUZEBhI2Hmpgnzq2hTKZ60LAMrlqiASm0aqAY6F8/A==
dependencies:
apollo-cache "^1.3.5"
apollo-utilities "^1.3.4"
optimism "^0.10.0"
ts-invariant "^0.4.0"
tslib "^1.10.0"

[email protected], apollo-cache@^1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.3.5.tgz#9dbebfc8dbe8fe7f97ba568a224bca2c5d81f461"
integrity sha512-1XoDy8kJnyWY/i/+gLTEbYLnoiVtS8y7ikBr/IfmML4Qb+CM7dEEbIUOjnY716WqmZ/UpXIxTfJsY7rMcqiCXA==
dependencies:
apollo-utilities "^1.3.4"
tslib "^1.10.0"

apollo-client@^2.6.10:
version "2.6.10"
resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.6.10.tgz#86637047b51d940c8eaa771a4ce1b02df16bea6a"
integrity sha512-jiPlMTN6/5CjZpJOkGeUV0mb4zxx33uXWdj/xQCfAMkuNAC3HN7CvYDyMHHEzmcQ5GV12LszWoQ/VlxET24CtA==
dependencies:
"@types/zen-observable" "^0.8.0"
apollo-cache "1.3.5"
apollo-link "^1.0.0"
apollo-utilities "1.3.4"
symbol-observable "^1.0.2"
ts-invariant "^0.4.0"
tslib "^1.10.0"
zen-observable "^0.8.0"

apollo-link-error@^1.0.3:
version "1.1.13"
resolved "https://registry.yarnpkg.com/apollo-link-error/-/apollo-link-error-1.1.13.tgz#c1a1bb876ffe380802c8df0506a32c33aad284cd"
integrity sha512-jAZOOahJU6bwSqb2ZyskEK1XdgUY9nkmeclCrW7Gddh1uasHVqmoYc4CKdb0/H0Y1J9lvaXKle2Wsw/Zx1AyUg==
dependencies:
apollo-link "^1.2.14"
apollo-link-http-common "^0.2.16"
tslib "^1.9.3"

apollo-link-http-common@^0.2.16:
version "0.2.16"
resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.16.tgz#756749dafc732792c8ca0923f9a40564b7c59ecc"
integrity sha512-2tIhOIrnaF4UbQHf7kjeQA/EmSorB7+HyJIIrUjJOKBgnXwuexi8aMecRlqTIDWcyVXCeqLhUnztMa6bOH/jTg==
dependencies:
apollo-link "^1.2.14"
ts-invariant "^0.4.0"
tslib "^1.9.3"

apollo-link-http@^1.3.1:
version "1.5.17"
resolved "https://registry.yarnpkg.com/apollo-link-http/-/apollo-link-http-1.5.17.tgz#499e9f1711bf694497f02c51af12d82de5d8d8ba"
integrity sha512-uWcqAotbwDEU/9+Dm9e1/clO7hTB2kQ/94JYcGouBVLjoKmTeJTUPQKcJGpPwUjZcSqgYicbFqQSoJIW0yrFvg==
dependencies:
apollo-link "^1.2.14"
apollo-link-http-common "^0.2.16"
tslib "^1.9.3"

apollo-link@^1.0.0, apollo-link@^1.0.6, apollo-link@^1.2.14:
version "1.2.14"
resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.14.tgz#3feda4b47f9ebba7f4160bef8b977ba725b684d9"
integrity sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg==
dependencies:
apollo-utilities "^1.3.0"
ts-invariant "^0.4.0"
tslib "^1.9.3"
zen-observable-ts "^0.8.21"

[email protected], apollo-utilities@^1.3.0, apollo-utilities@^1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.4.tgz#6129e438e8be201b6c55b0f13ce49d2c7175c9cf"
integrity sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig==
dependencies:
"@wry/equality" "^0.1.2"
fast-json-stable-stringify "^2.0.0"
ts-invariant "^0.4.0"
tslib "^1.10.0"

argparse@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
Expand Down Expand Up @@ -2217,7 +2102,7 @@ graphemer@^1.4.0:
resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==

graphql-tag@^2.12.6, graphql-tag@^2.4.2:
graphql-tag@^2.12.6:
version "2.12.6"
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.6.tgz#d441a569c1d2537ef10ca3d1633b48725329b5f1"
integrity sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==
Expand Down Expand Up @@ -2958,13 +2843,6 @@ once@^1.3.0:
dependencies:
wrappy "1"

optimism@^0.10.0:
version "0.10.3"
resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.10.3.tgz#163268fdc741dea2fb50f300bedda80356445fd7"
integrity sha512-9A5pqGoQk49H6Vhjb9kPgAeeECfUDF6aIICbMDL23kDLStBn1MWk3YvcZ4xWF9CsSf6XEgvRLkXy4xof/56vVw==
dependencies:
"@wry/context" "^0.4.0"

optimism@^0.18.0:
version "0.18.0"
resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.18.0.tgz#e7bb38b24715f3fdad8a9a7fc18e999144bbfa63"
Expand Down Expand Up @@ -3665,11 +3543,6 @@ supports-preserve-symlinks-flag@^1.0.0:
resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==

symbol-observable@^1.0.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"
integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==

symbol-observable@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205"
Expand Down Expand Up @@ -3741,13 +3614,6 @@ ts-invariant@^0.10.3:
dependencies:
tslib "^2.1.0"

ts-invariant@^0.4.0:
version "0.4.4"
resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86"
integrity sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA==
dependencies:
tslib "^1.9.3"

tsconfig-paths@^3.15.0:
version "3.15.0"
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4"
Expand All @@ -3763,7 +3629,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==

tslib@^1.10.0, tslib@^1.9.3:
tslib@^1.10.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
Expand Down Expand Up @@ -4020,22 +3886,14 @@ yocto-queue@^0.1.0:
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==

zen-observable-ts@^0.8.21:
version "0.8.21"
resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz#85d0031fbbde1eba3cd07d3ba90da241215f421d"
integrity sha512-Yj3yXweRc8LdRMrCC8nIc4kkjWecPAUVh0TI0OUrWXx6aX790vLcDlWca6I4vsyCGH3LpWxq0dJRcMOFoVqmeg==
dependencies:
tslib "^1.9.3"
zen-observable "^0.8.0"

zen-observable-ts@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-1.2.5.tgz#6c6d9ea3d3a842812c6e9519209365a122ba8b58"
integrity sha512-QZWQekv6iB72Naeake9hS1KxHlotfRpe+WGNbNx5/ta+R3DNjVO2bswf63gXlWDcs+EMd7XY8HfVQyP1X6T4Zg==
dependencies:
zen-observable "0.8.15"

[email protected], zen-observable@^0.8.0:
[email protected]:
version "0.8.15"
resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15"
integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==

0 comments on commit a4ac0d3

Please sign in to comment.