From 89458d55aa6554a6ac4da647a1e2aa7a7864dd7a Mon Sep 17 00:00:00 2001 From: Renovate-Bot <le.rameur.94@gmail.com> Date: Mon, 6 Feb 2023 13:29:07 +0000 Subject: [PATCH] chore: remove unused lib eslint-config-cozy-app --- .eslintrc.js | 2 + package.json | 3 +- .../Analysis/MaxConsumptionCard.spec.tsx | 4 +- .../Challenge/ChallengeCardLocked.spec.tsx | 2 +- .../Challenge/ChallengeCardOnGoing.tsx | 2 +- src/components/Challenge/ChallengeView.tsx | 10 +- src/components/Challenge/StarsContainer.tsx | 2 +- .../Connection/ConnectionResult.tsx | 2 +- .../Connection/ExpiredConsentModal.tsx | 2 +- src/components/Connection/FormOAuth.tsx | 2 +- .../DataloadConsumptionVisualizer.spec.tsx | 2 +- .../ConsumptionVisualizer/DataloadNoValue.tsx | 4 +- .../Ecogesture/SingleEcogesture.tsx | 2 +- .../EcogestureFormView.spec.tsx | 4 +- src/components/FormGlobal/FormNavigation.tsx | 2 +- src/components/Home/ConsumptionView.tsx | 2 +- src/components/Home/FluidButton.tsx | 2 +- src/components/Konnector/KonnectorModal.tsx | 8 +- .../Konnector/KonnectorModalFooter.tsx | 10 +- .../Konnector/KonnectorViewerCard.tsx | 10 +- src/components/Splash/SplashRoot.tsx | 2 +- src/locales/fr.json | 2 +- src/services/account.service.spec.ts | 2 +- src/services/action.service.ts | 2 +- src/services/challenge.service.ts | 10 +- src/services/consumption.service.spec.ts | 2 +- src/services/consumption.service.ts | 2 +- .../consumptionValidator.service.spec.ts | 2 +- src/services/exploration.service.ts | 6 +- src/services/fluidConfig.service.ts | 4 +- src/services/fluidsPrices.service.ts | 2 +- .../performanceIndicator.service.spec.ts | 10 +- src/services/profileType.service.ts | 4 +- src/services/quiz.service.ts | 14 +- src/services/usageEvent.service.ts | 2 +- src/store/global/global.reducer.ts | 2 +- src/targets/services/aggregatorUsageEvents.ts | 2 +- .../services/enedisHalfHourMonthlyAnalysis.ts | 8 +- src/targets/services/fluidsPrices.ts | 20 +- yarn.lock | 252 ++---------------- 40 files changed, 105 insertions(+), 322 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 4d604c901..ecbdf8bed 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -29,6 +29,8 @@ module.exports = { 'no-console': 'off', '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/prefer-optional-chain': 'warn', + 'no-param-reassign': 'warn', + 'spaced-comment': ['error', 'always', { block: { exceptions: ['*'] } }], 'react/self-closing-comp': 'warn', }, settings: { diff --git a/package.json b/package.json index 608ce972b..e461dbb15 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "deploy-dev": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build-dev}", "deploy-test": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build-test}", "lint": "yarn lint:js", - "lint:js": "cs lint {src,test}/**/*.{js,jsx,ts,tsx} --fix", + "lint:js": "eslint src -c .eslintrc.js --fix", "load-data": "cd test && importData.bat", "prebuild": "yarn lint", "prepare": "husky install", @@ -63,7 +63,6 @@ "cozy-ui": "79.3.0", "d3": "^6.0.0", "detect-browser": "^5.1.1", - "eslint-config-cozy-app": "5.1.0", "file-saver": "^2.0.5", "global": "^4.4.0", "handlebars": "^4.7.7", diff --git a/src/components/Analysis/MaxConsumptionCard.spec.tsx b/src/components/Analysis/MaxConsumptionCard.spec.tsx index 2ddf41589..ec38f6272 100644 --- a/src/components/Analysis/MaxConsumptionCard.spec.tsx +++ b/src/components/Analysis/MaxConsumptionCard.spec.tsx @@ -78,12 +78,12 @@ describe('MaxConsumptionCard component', () => { </Provider> ) expect(wrapper.find('.arrow-next').exists()).toBeTruthy() - //navigate next + // navigate next wrapper.find('.arrow-next').first().simulate('click') expect(wrapper.find('.fluid').text()).toBe('FLUID.GAS.LABEL') wrapper.find('.arrow-next').first().simulate('click') expect(wrapper.find('.fluid').text()).toBe('FLUID.ELECTRICITY.LABEL') - //navigate prev + // navigate prev wrapper.find('.arrow-prev').first().simulate('click') expect(wrapper.find('.fluid').text()).toBe('FLUID.GAS.LABEL') wrapper.find('.arrow-prev').first().simulate('click') diff --git a/src/components/Challenge/ChallengeCardLocked.spec.tsx b/src/components/Challenge/ChallengeCardLocked.spec.tsx index 84fee1557..80236b171 100644 --- a/src/components/Challenge/ChallengeCardLocked.spec.tsx +++ b/src/components/Challenge/ChallengeCardLocked.spec.tsx @@ -12,7 +12,7 @@ jest.mock('cozy-ui/transpiled/react/I18n', () => { }), } }) -//TODO fis MUI theme error +// TODO fis MUI theme error describe('ChallengeCardLocked component', () => { it('should be rendered correctly', () => { const component = shallow( diff --git a/src/components/Challenge/ChallengeCardOnGoing.tsx b/src/components/Challenge/ChallengeCardOnGoing.tsx index 9933fcbee..be9eb1452 100644 --- a/src/components/Challenge/ChallengeCardOnGoing.tsx +++ b/src/components/Challenge/ChallengeCardOnGoing.tsx @@ -50,7 +50,7 @@ const ChallengeCardOnGoing: React.FC<ChallengeCardOnGoingProps> = ({ }, []) const goDuel = async () => { setIsLoading(true) - //Check if at least one fluid is up + // Check if at least one fluid is up if (fluidTypes.length !== 0) { if (userChallenge.duel.state !== UserDuelState.ONGOING) { const challengeService = new ChallengeService(client) diff --git a/src/components/Challenge/ChallengeView.tsx b/src/components/Challenge/ChallengeView.tsx index 7e3e1b744..49a0ee304 100644 --- a/src/components/Challenge/ChallengeView.tsx +++ b/src/components/Challenge/ChallengeView.tsx @@ -36,7 +36,7 @@ const ChallengeView: React.FC = () => { } const resetValues = () => { - //Method used to cancel a swipe on a simple click + // Method used to cancel a swipe on a simple click setTouchEnd(0) setTouchStart(0) } @@ -85,16 +85,16 @@ const ChallengeView: React.FC = () => { } const handleClickOrTouchEnd = () => { - //if the swipe is too small and can be taken for a touch + // if the swipe is too small and can be taken for a touch if (touchStart && touchEnd) { if (touchStart - touchEnd < 5 && -5 < touchStart - touchEnd) return - //Change the following value in order to change the swipe sensibilyy + // Change the following value in order to change the swipe sensibilyy if (touchStart - touchEnd > 75) { - //If swipe left move slider right and add positive translation + // If swipe left move slider right and add positive translation moveSliderRight() } if (touchStart - touchEnd < -75) { - //If swipe right move slider left and add negative translation + // If swipe right move slider left and add negative translation moveSliderLeft() } } diff --git a/src/components/Challenge/StarsContainer.tsx b/src/components/Challenge/StarsContainer.tsx index 2559ff83a..47ce2ce2b 100644 --- a/src/components/Challenge/StarsContainer.tsx +++ b/src/components/Challenge/StarsContainer.tsx @@ -16,7 +16,7 @@ const StarsContainer: React.FC<StarsContainerProps> = ({ useEffect(() => { const renderStars = () => { - //To be removed when action and explorations will be done + // To be removed when action and explorations will be done if (result === 5) { elements.splice(0, elements.length) } diff --git a/src/components/Connection/ConnectionResult.tsx b/src/components/Connection/ConnectionResult.tsx index 214dadb43..9fc8b66bd 100644 --- a/src/components/Connection/ConnectionResult.tsx +++ b/src/components/Connection/ConnectionResult.tsx @@ -119,7 +119,7 @@ const ConnectionResult: React.FC<ConnectionResultProps> = ({ if (fluidType == FluidType.ELECTRICITY) { const accountData = fluidStatus.connection.account ?.auth as AccountSgeData - //store the previous account data since the onDelete will remove account from DB + // store the previous account data since the onDelete will remove account from DB dispatch( updateSgeStore({ currentStep: 0, diff --git a/src/components/Connection/ExpiredConsentModal.tsx b/src/components/Connection/ExpiredConsentModal.tsx index 792c8301f..ef0c9c5ee 100644 --- a/src/components/Connection/ExpiredConsentModal.tsx +++ b/src/components/Connection/ExpiredConsentModal.tsx @@ -39,7 +39,7 @@ const ExpiredConsentModal: React.FC<ExpiredConsentModalProps> = ({ if (fluidType === FluidType.ELECTRICITY) { const accountData = fluidStatus[FluidType.ELECTRICITY].connection.account ?.auth as AccountSgeData - //store the previous account data since the onDelete will remove account from DB + // store the previous account data since the onDelete will remove account from DB dispatch( updateSgeStore({ currentStep: 0, diff --git a/src/components/Connection/FormOAuth.tsx b/src/components/Connection/FormOAuth.tsx index 08dd87b65..93eb4226d 100644 --- a/src/components/Connection/FormOAuth.tsx +++ b/src/components/Connection/FormOAuth.tsx @@ -33,7 +33,7 @@ const FormOAuth: React.FC<FormOAuthProps> = ({ const dispatch = useDispatch() const endOAuth = useCallback(() => { setStatus(IDLE) - //Set back to false the variable that allows to automatically refresh the consent (deletes and recreates the account) + // Set back to false the variable that allows to automatically refresh the consent (deletes and recreates the account) dispatch(setShouldRefreshConsent(false)) }, [dispatch]) diff --git a/src/components/ConsumptionVisualizer/DataloadConsumptionVisualizer.spec.tsx b/src/components/ConsumptionVisualizer/DataloadConsumptionVisualizer.spec.tsx index 31bf92185..9377278e2 100644 --- a/src/components/ConsumptionVisualizer/DataloadConsumptionVisualizer.spec.tsx +++ b/src/components/ConsumptionVisualizer/DataloadConsumptionVisualizer.spec.tsx @@ -163,7 +163,7 @@ describe('Dataload consumption visualizer component', () => { const mockAddEvent = jest.fn() UsageEventService.addEvent = mockAddEvent - //Render Navlinks to fluids + // Render Navlinks to fluids wrapper.find('.dataloadvisualizer-euro-fluid').first().simulate('click') expect(mockAddEvent).toHaveBeenCalled() }) diff --git a/src/components/ConsumptionVisualizer/DataloadNoValue.tsx b/src/components/ConsumptionVisualizer/DataloadNoValue.tsx index e00a7d364..cef6acd8c 100644 --- a/src/components/ConsumptionVisualizer/DataloadNoValue.tsx +++ b/src/components/ConsumptionVisualizer/DataloadNoValue.tsx @@ -25,12 +25,12 @@ const DataloadNoValue: React.FC<DataloadNoValueProps> = ({ const content = document.querySelector('.content-view') if (content && app) { setTimeout(() => { - //Desktop devices + // Desktop devices app.scrollTo({ top: content.scrollHeight + 300, behavior: 'smooth', }) - //Mobiles devices + // Mobiles devices app.scrollIntoView({ behavior: 'smooth', block: 'end', diff --git a/src/components/Ecogesture/SingleEcogesture.tsx b/src/components/Ecogesture/SingleEcogesture.tsx index 5368d0dca..58b9237fa 100644 --- a/src/components/Ecogesture/SingleEcogesture.tsx +++ b/src/components/Ecogesture/SingleEcogesture.tsx @@ -95,7 +95,7 @@ const SingleEcogesture: React.FC = () => { if (subscribed) { if (data?.[0]) { setEcogesture(data[0]) - //Prevent case this key doesn't exist in doctype + // Prevent case this key doesn't exist in doctype setIsObjective(data[0].objective) setIsDoing(data[0].doing) const icon = await importIconById(data[0].id, 'ecogesture') diff --git a/src/components/EcogestureForm/EcogestureFormView.spec.tsx b/src/components/EcogestureForm/EcogestureFormView.spec.tsx index 9e98552b9..ced14d322 100644 --- a/src/components/EcogestureForm/EcogestureFormView.spec.tsx +++ b/src/components/EcogestureForm/EcogestureFormView.spec.tsx @@ -98,13 +98,13 @@ describe('EcogestureFormView component', () => { <EcogestureFormView /> </Provider> ) - //go first to next step + // go first to next step await waitForComponentToPaint(wrapper) wrapper.find('input').first().simulate('change') await waitForComponentToPaint(wrapper) wrapper.find(Button).at(1).simulate('click') await waitForComponentToPaint(wrapper) - //then go back + // then go back wrapper.find(Button).first().simulate('click') expect(wrapper.find('.ecogesture-form-single').exists()).toBeTruthy() }) diff --git a/src/components/FormGlobal/FormNavigation.tsx b/src/components/FormGlobal/FormNavigation.tsx index c720d5bb6..dc4fd447d 100644 --- a/src/components/FormGlobal/FormNavigation.tsx +++ b/src/components/FormGlobal/FormNavigation.tsx @@ -36,7 +36,7 @@ const FormNavigation: React.FC<FormNavigationProps> = ({ } const handleNextClick = () => { handleNext() - //handle go back to connect for SGE + // handle go back to connect for SGE if (isLastConnectStep) { navigate('/consumption/electricity') } diff --git a/src/components/Home/ConsumptionView.tsx b/src/components/Home/ConsumptionView.tsx index f73f22f87..83a6b6199 100644 --- a/src/components/Home/ConsumptionView.tsx +++ b/src/components/Home/ConsumptionView.tsx @@ -161,7 +161,7 @@ const ConsumptionView: React.FC<ConsumptionViewProps> = ({ useEffect(() => { let subscribed = true const expiredConsents: FluidType[] = [] - //Check if some fluids have expired consent error + // Check if some fluids have expired consent error for (const fluid of fluidStatus) { const error = fluid.connection.triggerState?.last_error if (error && getKonnectorUpdateError(error) === 'error_update_oauth') { diff --git a/src/components/Home/FluidButton.tsx b/src/components/Home/FluidButton.tsx index f4dfb311c..9d24a0d2b 100644 --- a/src/components/Home/FluidButton.tsx +++ b/src/components/Home/FluidButton.tsx @@ -74,7 +74,7 @@ const FluidButton: React.FC<FluidButtonProps> = ({ const isFluidMaintenance = () => fluidStatus[fluidType]?.maintenance useEffect(() => { - //Show errors only on konnected konnectors that are in error, outdated, with no data (specific case), and not in multifluid + // Show errors only on konnected konnectors that are in error, outdated, with no data (specific case), and not in multifluid if ( (fluidType !== FluidType.MULTIFLUID && isConnected() && isErrored()) || (fluidType !== FluidType.MULTIFLUID && isConnected() && isOutdated()) || diff --git a/src/components/Konnector/KonnectorModal.tsx b/src/components/Konnector/KonnectorModal.tsx index 1b6dd8ddb..6796da60a 100644 --- a/src/components/Konnector/KonnectorModal.tsx +++ b/src/components/Konnector/KonnectorModal.tsx @@ -149,7 +149,7 @@ const KonnectorModal: React.FC<KonnectorModalProps> = ({ {state === ERROR_EVENT && ( <> {error === KonnectorError.LOGIN_FAILED && ( - //LOGIN FAILED FOR ENEDIS AND EGL + // LOGIN FAILED FOR ENEDIS AND EGL <div className="konnector-config"> <Icon icon={errorIcon} size={48} /> <div className="kce-picto-txt text-20-bold"> @@ -196,7 +196,7 @@ const KonnectorModal: React.FC<KonnectorModalProps> = ({ {error === KonnectorError.TERMS_VERSION_MISMATCH && isUpdating && fluidType === FluidType.ELECTRICITY && ( - //MISMATCH UPDATE ERROR ENEDIS + // MISMATCH UPDATE ERROR ENEDIS <div className="kce-picto-txt konnector-config mismatch"> <Icon icon={EnedisIcon} width={120} height={80} /> <div className="title text-20-bold"> @@ -215,7 +215,7 @@ const KonnectorModal: React.FC<KonnectorModalProps> = ({ )} {error !== KonnectorError.LOGIN_FAILED && error !== KonnectorError.TERMS_VERSION_MISMATCH && ( - //DEFAULT CASE + // DEFAULT CASE <div className="konnector-config"> {console.log('errortype', error)} <Icon icon={errorIcon} size={48} /> @@ -237,7 +237,7 @@ const KonnectorModal: React.FC<KonnectorModalProps> = ({ </> )} {state === SUCCESS_EVENT && ( - //SUCCESS CASE + // SUCCESS CASE <div className="konnector-config"> <Icon icon={successIcon} size={48} /> <div className="kcs-picto-txt text-20-bold"> diff --git a/src/components/Konnector/KonnectorModalFooter.tsx b/src/components/Konnector/KonnectorModalFooter.tsx index 584dd67a6..c8e14e357 100644 --- a/src/components/Konnector/KonnectorModalFooter.tsx +++ b/src/components/Konnector/KonnectorModalFooter.tsx @@ -52,7 +52,7 @@ const KonnectorModalFooter: React.FC<KonnectorModalFooterProps> = ({ const errorButtons = () => { switch (error) { case KonnectorError.USER_ACTION_NEEDED: - //INSEE CODE ERROR ENEDIS + // INSEE CODE ERROR ENEDIS return ( <Button aria-label={t('konnector_modal.accessibility.button_close')} @@ -67,7 +67,7 @@ const KonnectorModalFooter: React.FC<KonnectorModalFooterProps> = ({ </Button> ) case KonnectorError.LOGIN_FAILED: - //MISMATCH NAME / ADDRESS / PDL + // MISMATCH NAME / ADDRESS / PDL return ( <Button aria-label={t('konnector_modal.accessibility.button_close')} @@ -111,8 +111,8 @@ const KonnectorModalFooter: React.FC<KonnectorModalFooterProps> = ({ </div> ) default: - //DEFAULT FOOTER BUTTONS - //TODO change default button + // DEFAULT FOOTER BUTTONS + // TODO change default button return ( <Button aria-label={t('konnector_modal.accessibility.button_close')} @@ -130,7 +130,7 @@ const KonnectorModalFooter: React.FC<KonnectorModalFooterProps> = ({ } const successButton = () => { - //DEFAULT FOOTER BUTTONS + // DEFAULT FOOTER BUTTONS return ( <Button aria-label={t('konnector_modal.accessibility.button_close')} diff --git a/src/components/Konnector/KonnectorViewerCard.tsx b/src/components/Konnector/KonnectorViewerCard.tsx index 694f15027..e4b391981 100644 --- a/src/components/Konnector/KonnectorViewerCard.tsx +++ b/src/components/Konnector/KonnectorViewerCard.tsx @@ -184,7 +184,7 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({ const handleConnectionEnd = useCallback( async (isSuccess?: boolean) => { if ( - //CASE FOR GLOBAL LOGIN FAILED + // CASE FOR GLOBAL LOGIN FAILED (account && !isSuccess && (konnectorErrorDescription === KonnectorError.LOGIN_FAILED || @@ -193,7 +193,7 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({ fluidStatus !== null && fluidStatus.connection.account !== null && fluidStatus.connection.account.auth !== undefined) || - //CASE FOR ENEDIS CODE INSEE ERROR + // CASE FOR ENEDIS CODE INSEE ERROR (account && !isSuccess && !isUpdating && @@ -202,19 +202,19 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({ fluidStatus.connection.account !== null && fluidStatus.connection.account.auth !== undefined) ) { - //KEEP CREDENTIALS FOR EGL + // KEEP CREDENTIALS FOR EGL if (fluidSlug === FluidSlugType.WATER) { const auth = fluidStatus.connection.account.auth as AccountAuthData fluidStatus.connection.konnectorConfig.lastKnownCredentials = auth.login } - //DELETE ACCOUNT + // DELETE ACCOUNT const accountService = new AccountService(client) await accountService.deleteAccount(account) await handleAccountDeletion() } else { if (isSuccess && fluidStatus.lastDataDate === null) { - //UPDATE THE DACC EVENT STATUS TO SUCCESS + // UPDATE THE DACC EVENT STATUS TO SUCCESS await UsageEventService.udpateConnectionAttemptEvent( client, fluidSlug diff --git a/src/components/Splash/SplashRoot.tsx b/src/components/Splash/SplashRoot.tsx index ea6cffa0c..a7432b5eb 100644 --- a/src/components/Splash/SplashRoot.tsx +++ b/src/components/Splash/SplashRoot.tsx @@ -214,7 +214,7 @@ const SplashRoot = ({ fadeTimer = 1000, children }: SplashRootProps) => { ) ) - //init Terms + // init Terms const termsStatus: TermsStatus = await initializationService.initConsent() if (subscribed) dispatch(updateTermValidation(termsStatus)) diff --git a/src/locales/fr.json b/src/locales/fr.json index 522a87379..fcf5f1b82 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -854,7 +854,7 @@ "p6b": "Maintenance technique : ", "p6": "Délégation Développement économique, emploi & savoirs - Innovation numérique & systèmes d’information - Usages et services numériques - Développement des services numériques", "title1": "Crédits", - "part1": "Ce site est le résultat de développements spécifiques réalisés dans les langages Go, TypeScript, HTML et Sass. Les développements s’appuient sur plusieurs bibliothèques et frameworks libres : axios, cozy-bar, cozy-client, cozy-harvest-lib, cozy-scripts, cozy-ui, d3, detect-browser, eslint-config-cozy-app, global, lodash, luxon, moment, moment-timezone, node-sass, object-hash, react, react-dom, react-redux, react-router-dom, react-swipeable-views, redux-devtools-extension, sass-loader. Les tests de l’application s’appuient sur les bibliothèques et frameworks libres suivants: enzyme, enzyme-adapter-react-16, jest-junit, react-test-renderer, redux-mock-store. La pile technique intègre également les applications Cozy stack, Yarn, Docker, ACH. Les déploiements sont réalisés sur le registre hébergé chez Cozy. L’équipe de réalisation utilise au quotidien les applications GitLab, IceScrum, RocketChat, SonarQube.", + "part1": "Ce site est le résultat de développements spécifiques réalisés dans les langages Go, TypeScript, HTML et Sass. Les développements s’appuient sur plusieurs bibliothèques et frameworks libres : axios, cozy-bar, cozy-client, cozy-harvest-lib, cozy-scripts, cozy-ui, d3, detect-browser, global, lodash, luxon, moment, moment-timezone, node-sass, object-hash, react, react-dom, react-redux, react-router-dom, react-swipeable-views, redux-devtools-extension, sass-loader. Les tests de l’application s’appuient sur les bibliothèques et frameworks libres suivants: enzyme, enzyme-adapter-react-16, jest-junit, react-test-renderer, redux-mock-store. La pile technique intègre également les applications Cozy stack, Yarn, Docker, ACH. Les déploiements sont réalisés sur le registre hébergé chez Cozy. L’équipe de réalisation utilise au quotidien les applications GitLab, IceScrum, RocketChat, SonarQube.", "title2": "Traitement des données personnelles et droit d’accès, de modification et de suppression", "part2": "Conformément à la réglementation en vigueur en matière de protection des données personnelles, le service Ecolyo a fait l’objet d’une inscription au registre des traitements de la Métropole de Lyon. Ecolyo fait partie de l’écosystème de services orientés « self data » déployés par la Métropole de Lyon avec l’ambition d’offrir aux usagers métropolitains les outils et les services leur permettant d’exercer directement leur droit à la portabilité, dans un cadre apte à garantir aussi bien la transparence et le contrôle sur l’usage de leurs données personnelles que l’exploitation directe du contenu de ces données selon leurs libres choix. Le self data est en effet selon la Fondation Internet Nouvelle Génération (FING) « la production, l’exploitation et le partage de données personnelles par les individus, sous leur contrôle et à leurs propres fins ». Au sein de cet environnement self data, la gestion des données s’appuie sur l’organisation suivante des rôles et responsabilités associées : ", "part2-1": "Les partenaires du service GRDF et Eau Publique du Grand Lyon sont responsables exclusivement des seuls traitements de Données Personnelles relatifs à la collecte des données de consommation de gaz et d’eau de l’utilisateur et à leur transmission sur la plateforme de cloud personnel, après consentement de l’utilisateur.", diff --git a/src/services/account.service.spec.ts b/src/services/account.service.spec.ts index c52dfac07..a3d19f984 100644 --- a/src/services/account.service.spec.ts +++ b/src/services/account.service.spec.ts @@ -30,7 +30,7 @@ describe('Account service', () => { mockHavestLibAccounts.createAccount.mockResolvedValueOnce(accountsData[2]) const mockAuthData: AccountAuthData = { login: 'login', - password: 'password', //NOSONAR + password: 'password', // NOSONAR } const result = await accountService.createAccount( konnectorsData[2], diff --git a/src/services/action.service.ts b/src/services/action.service.ts index 2383d7f14..7a705f650 100644 --- a/src/services/action.service.ts +++ b/src/services/action.service.ts @@ -38,7 +38,7 @@ export default class ActionService { .map(challenge => challenge.action) .filter(action => action.state === UserActionState.DONE) .map(action => action.ecogesture && action.ecogesture.id) - //Remove actions Done from the list + // Remove actions Done from the list if (actionsDone.length > 0) { actionsListIds.forEach(id => { if (actionsDone.includes(id)) { diff --git a/src/services/challenge.service.ts b/src/services/challenge.service.ts index fb7c042a7..012741fb6 100644 --- a/src/services/challenge.service.ts +++ b/src/services/challenge.service.ts @@ -162,7 +162,7 @@ export default class ChallengeService { ): Promise<boolean> { let isValid = false const fluidCondition: FluidType[] = exploration.fluid_condition - //check if the fluid is connected + // check if the fluid is connected if ( fluidStatus[fluidCondition[0]].status !== FluidState.KONNECTOR_NOT_FOUND && @@ -212,7 +212,7 @@ export default class ChallengeService { fluidStatus: FluidStatus[] ): Promise<UserChallenge | undefined> { let userChallenge: UserChallenge | null = null - //Check if it's a conditionnal exploration + // Check if it's a conditionnal exploration if (exploration.fluid_condition.length > 0) { const isConditionVerified = await this.isExplorationConditionVerified( exploration, @@ -228,7 +228,7 @@ export default class ChallengeService { ) return userChallenge } - } //if there is no condition, add the exploration + } // if there is no condition, add the exploration else { userChallenge = this.parseChallengeEntityToUserChallenge( challenge, @@ -383,7 +383,7 @@ export default class ChallengeService { quizEntities || [], relationEntities.quizEntityRelation._id ) - //Only one exploration relation + // Only one exploration relation if (relationEntities.explorationEntityRelation.length === 1) { const exploration: UserExploration = explorationService.getUserExplorationfromExplorationEntities( @@ -398,7 +398,7 @@ export default class ChallengeService { ) buildList.push(userChallenge) } - //Several explorations with fluid condition + // Several explorations with fluid condition else { await this.processExploration( explorationEntities, diff --git a/src/services/consumption.service.spec.ts b/src/services/consumption.service.spec.ts index b8757e23e..226026b02 100644 --- a/src/services/consumption.service.spec.ts +++ b/src/services/consumption.service.spec.ts @@ -351,7 +351,7 @@ describe('Consumption service', () => { mockFetchFluidData.mockResolvedValueOnce(mockFetchDataComparison) mockFetchFluidData.mockResolvedValueOnce(mockFetchDataActual) mockFetchFluidData.mockResolvedValueOnce(mockFetchDataComparison) - //Incomplete Data to test all possibilities + // Incomplete Data to test all possibilities mockFetchFluidData.mockResolvedValueOnce([ { date: DateTime.fromISO('2020-08-01T00:23:20.000Z'), diff --git a/src/services/consumption.service.ts b/src/services/consumption.service.ts index 535e8857f..3ad714225 100644 --- a/src/services/consumption.service.ts +++ b/src/services/consumption.service.ts @@ -403,7 +403,7 @@ export default class ConsumptionDataManager { private aggregateGraphData( singleFluidCharts: ISingleFluidChartData[] - //,withComparison: boolean = true + // ,withComparison: boolean = true ): Datachart | null { if (singleFluidCharts[0]?.chartData) { const converterService = new ConverterService() diff --git a/src/services/consumptionValidator.service.spec.ts b/src/services/consumptionValidator.service.spec.ts index 41aee67ea..2957f4619 100644 --- a/src/services/consumptionValidator.service.spec.ts +++ b/src/services/consumptionValidator.service.spec.ts @@ -95,7 +95,7 @@ describe('ConsumptionFormatter service', () => { expect(result).toBeFalsy() }) it('should return false because of HALF_AN_HOUR and ValidateTimePeriodLength', () => { - fluidTypes = [0] //Only fluid without TimeStep incompatibilty + fluidTypes = [0] // Only fluid without TimeStep incompatibilty const mockTimePeriodTooLong: TimePeriod = { startDate: DateTime.fromISO('2020-10-01T00:00:00.000Z', { zone: 'utc', diff --git a/src/services/exploration.service.ts b/src/services/exploration.service.ts index 1bc61c88c..40ddc77db 100644 --- a/src/services/exploration.service.ts +++ b/src/services/exploration.service.ts @@ -144,7 +144,7 @@ export default class ExplorationService { const updatedUserExploration: UserExploration = { ...userExploration, state: UserExplorationState.NOTIFICATION, - progress: 5, //userExploration.type === UserExplorationType.ACTION ? 3 : 1, + progress: 5, // userExploration.type === UserExplorationType.ACTION ? 3 : 1, } return updatedUserExploration } @@ -157,7 +157,7 @@ export default class ExplorationService { const updatedUserExploration: UserExploration = { ...userExploration, state: UserExplorationState.DONE, - progress: 5, //userExploration.type === UserExplorationType.ACTION ? 3 : 1, + progress: 5, // userExploration.type === UserExplorationType.ACTION ? 3 : 1, } return updatedUserExploration } @@ -194,7 +194,7 @@ export default class ExplorationService { const challengeService = new ChallengeService(this._client) switch (explorationID) { case UserExplorationID.EXPLORATION007: - //ECOLYO CONNEXION EXPLORATION + // ECOLYO CONNEXION EXPLORATION if ( currentChallenge.exploration.progress + 1 < currentChallenge.exploration.target diff --git a/src/services/fluidConfig.service.ts b/src/services/fluidConfig.service.ts index e78242383..b6aae3539 100644 --- a/src/services/fluidConfig.service.ts +++ b/src/services/fluidConfig.service.ts @@ -12,8 +12,8 @@ export default class ConfigService { * @param max Maximum hour for cron */ public getCronArgs(min = 8, max = 9): string { - const randomHour = Math.floor(Math.random() * (max - min + 1) + min) //NOSONAR - const randomMinutes = Math.floor(Math.random() * 59) //NOSONAR + const randomHour = Math.floor(Math.random() * (max - min + 1) + min) // NOSONAR + const randomMinutes = Math.floor(Math.random() * 59) // NOSONAR return `0 ${randomMinutes} ${randomHour} * * *` } } diff --git a/src/services/fluidsPrices.service.ts b/src/services/fluidsPrices.service.ts index 91dea0698..39ac3bf34 100644 --- a/src/services/fluidsPrices.service.ts +++ b/src/services/fluidsPrices.service.ts @@ -23,7 +23,7 @@ export default class FluidPricesService { */ public async getAllPrices(): Promise<FluidPrice[]> { const query: QueryDefinition = Q(FLUIDPRICES_DOCTYPE).limitBy(900) - //TODO : handle case of 1000+ entries in doctype + // TODO : handle case of 1000+ entries in doctype const { data: fluidsPrices }: QueryResult<FluidPrice[]> = await this._client.query(query) return fluidsPrices diff --git a/src/services/performanceIndicator.service.spec.ts b/src/services/performanceIndicator.service.spec.ts index ec4706dce..e73c56e12 100644 --- a/src/services/performanceIndicator.service.spec.ts +++ b/src/services/performanceIndicator.service.spec.ts @@ -34,7 +34,7 @@ describe('performanceIndicator service', () => { ) expect(result).toEqual(expectedResult) - //Only two values + // Only two values performanceIndicator = [ { value: 10, @@ -58,7 +58,7 @@ describe('performanceIndicator service', () => { ) expect(result).toEqual(expectedResult) - //lack of value for one + // lack of value for one performanceIndicator = [ { value: null, @@ -87,7 +87,7 @@ describe('performanceIndicator service', () => { ) expect(result).toEqual(expectedResult) - //lack of compareValue for one + // lack of compareValue for one performanceIndicator = [ { value: 30, @@ -116,7 +116,7 @@ describe('performanceIndicator service', () => { ) expect(result).toEqual(expectedResult) - //Only one with no compared value + // Only one with no compared value performanceIndicator = [ { value: 30, @@ -135,7 +135,7 @@ describe('performanceIndicator service', () => { ) expect(result).toEqual(expectedResult) - //Only one with no value + // Only one with no value performanceIndicator = [ { value: null, diff --git a/src/services/profileType.service.ts b/src/services/profileType.service.ts index 3aab00466..5dafc811a 100644 --- a/src/services/profileType.service.ts +++ b/src/services/profileType.service.ts @@ -83,7 +83,7 @@ export default class ProfileTypeService { this.profileType.hasReplacedHeater const heating = this.profileType.heating - //Apply corrections + // Apply corrections const correctionsNbWalls = heatingData.adjustment_outisde_facing_walls[housingType] const correctionWalls: number = correctionsNbWalls[outsideFacingWalls] @@ -497,7 +497,7 @@ export default class ProfileTypeService { .endOf('month') .plus({ minutes: 5 }) .toISO() - //We add or remove 5 minutes so the api returns the exact period + // We add or remove 5 minutes so the api returns the exact period try { const result = await this._client .getStackClient() diff --git a/src/services/quiz.service.ts b/src/services/quiz.service.ts index 8f6aa656e..ca0bb4cb5 100644 --- a/src/services/quiz.service.ts +++ b/src/services/quiz.service.ts @@ -289,7 +289,7 @@ export default class QuizService { if (customQuestionEntity.singleFluid === true) { let unitLabel = 'kWh' let fluidLabel = "d'électricité" - //Define the right fluidType + // Define the right fluidType if (fluidType.includes(FluidType.ELECTRICITY)) { useFluidType = [FluidType.ELECTRICITY] unit = 'kWh' @@ -303,12 +303,12 @@ export default class QuizService { unitLabel = 'litre' fluidLabel = "d'eau" } - //Adapt the question + // Adapt the question questionLabel = questionLabel.replace('#unit', unitLabel) questionLabel = questionLabel.replace('#fluid', fluidLabel) } if (customQuestionEntity.type === CustomQuestionType.DATE) { - //Interval + // Interval const intervalAsnwer: IntervalAnswer = await this.getMaxLoadOnLastInterval( customQuestionEntity.timeStep, @@ -321,7 +321,7 @@ export default class QuizService { finalInterval ) } else if (customQuestionEntity.type === CustomQuestionType.MAXDATA) { - //Max data + // Max data const consumptionService = new ConsumptionDataManager(this._client) let maxLoad = await consumptionService.getMaxLoad( finalInterval, @@ -333,7 +333,7 @@ export default class QuizService { maxLoad = maxLoad === null ? 0 : maxLoad answers = this.getAnswersForNumberValue(maxLoad as number, unit) } else { - //average + // average const averageLoad: number = await this.getAverageOnGivenPeriod( customQuestionEntity.timeStep, finalInterval, @@ -642,11 +642,11 @@ export default class QuizService { private getAnswersForNumberValue(maxLoad: number, unit: string): Answer[] { const coefList: number[] = [0.6, 0.7, 0.8, 0.12, 0.13] // Pick a random number in the coefList and remove it from array - const index1: number = Math.floor(Math.random() * coefList.length) //NOSONAR + const index1: number = Math.floor(Math.random() * coefList.length) // NOSONAR const roll: number[] = coefList.splice(index1, 1) const coef1: number = roll[0] // Pick a second number in the coefList - const index2: number = Math.floor(Math.random() * coefList.length) //NOSONAR + const index2: number = Math.floor(Math.random() * coefList.length) // NOSONAR const roll2: number[] = coefList.splice(index2, 1) const coef2: number = roll2[0] // Format answers diff --git a/src/services/usageEvent.service.ts b/src/services/usageEvent.service.ts index 6ab397ddd..9b18e59c4 100644 --- a/src/services/usageEvent.service.ts +++ b/src/services/usageEvent.service.ts @@ -77,7 +77,7 @@ export default class UsageEventService { konnectorSlug: string ): Promise<UsageEventEntity | undefined> { try { - //Get last Connection attempt Event + // Get last Connection attempt Event const query: QueryDefinition = Q(USAGEEVENT_DOCTYPE) .where({ type: UsageEventType.KONNECTOR_ATTEMPT_EVENT, diff --git a/src/store/global/global.reducer.ts b/src/store/global/global.reducer.ts index 848faf512..624e2edbd 100644 --- a/src/store/global/global.reducer.ts +++ b/src/store/global/global.reducer.ts @@ -141,7 +141,7 @@ const getFluidTypesFromStatus = (fluidStatus: FluidStatus[]): FluidType[] => { (fluid.status !== FluidState.KONNECTOR_NOT_FOUND && fluid.status !== FluidState.NOT_CONNECTED && fluid.status !== FluidState.ERROR_LOGIN_FAILED) || - //Handle Login Error case for oauth konnectors + // Handle Login Error case for oauth konnectors (fluid.status === FluidState.ERROR_LOGIN_FAILED && fluid.fluidType !== FluidType.WATER) ) { diff --git a/src/targets/services/aggregatorUsageEvents.ts b/src/targets/services/aggregatorUsageEvents.ts index fbdbf208f..9a2c6fd14 100644 --- a/src/targets/services/aggregatorUsageEvents.ts +++ b/src/targets/services/aggregatorUsageEvents.ts @@ -782,7 +782,7 @@ const sendKonnectorEvents = async (client: Client) => { }) .startOf('day') .toISODate(), - value: allConnectionEvents.length + 1, //+1 in order to count the success + value: allConnectionEvents.length + 1, // +1 in order to count the success } // Send indicator if it's in current month if (successEvent.eventDate.month === today.minus({ month: 1 }).month) { diff --git a/src/targets/services/enedisHalfHourMonthlyAnalysis.ts b/src/targets/services/enedisHalfHourMonthlyAnalysis.ts index 3f9a56f50..ab8022669 100644 --- a/src/targets/services/enedisHalfHourMonthlyAnalysis.ts +++ b/src/targets/services/enedisHalfHourMonthlyAnalysis.ts @@ -191,7 +191,7 @@ const getEnedisMonthAnalysisData = async ( const syncEnedisMonthlyAnalysisDataDoctype = async ({ client, }: EnedisMonthlyProps) => { - //SERVICE RUNS ONLY IF ENEDIS MINUTE IS ACTIVATED + // SERVICE RUNS ONLY IF ENEDIS MINUTE IS ACTIVATED const emas = new EnedisMonthlyAnalysisDataService(client) const cs = new ConsumptionService(client) const firstMinuteData = (await cs.getFirsDataDateFromDoctype( @@ -200,7 +200,7 @@ const syncEnedisMonthlyAnalysisDataDoctype = async ({ const lastEnedisMonthlyAnalysis = await emas.getLastEnedisMonthlyAnalysis() if (firstMinuteData && firstMinuteData[0]) { - //First creates the analysis of the month - 1 + // First creates the analysis of the month - 1 logStack('info', 'Fetching last Enedis monthly Analysis...') const firstMinuteDate = DateTime.fromObject({ year: firstMinuteData[0].year, @@ -234,7 +234,7 @@ const syncEnedisMonthlyAnalysisDataDoctype = async ({ logStack('info', 'Getting first endis half hour data date') if (lastEnedisMonthlyAnalysis.length > 0) { - //If user has more than one entry (already synced), fetch the full history + // If user has more than one entry (already synced), fetch the full history const firstEnedisMonthlyAnalysis = (await cs.getFirsDataDateFromDoctype( ENEDIS_MONTHLY_ANALYSIS_DATA_DOCTYPE )) as EnedisMonthlyAnalysisData[] @@ -271,7 +271,7 @@ const syncEnedisMonthlyAnalysisDataDoctype = async ({ } } } else { - //If user only have the last analysis available, fetch one year history + // If user only have the last analysis available, fetch one year history logStack( 'info', 'Doctype is empty, fetching history for one year maximum or until first enedis minute date' diff --git a/src/targets/services/fluidsPrices.ts b/src/targets/services/fluidsPrices.ts index 4f4c1137c..fd0208f8c 100644 --- a/src/targets/services/fluidsPrices.ts +++ b/src/targets/services/fluidsPrices.ts @@ -51,13 +51,13 @@ const synchroPricesToUpdate = async ( let firstEditedPrice: string | null = null await Promise.all( remotePrices.map(remotePrice => { - //eslint-disable-next-line no-async-promise-executor + // eslint-disable-next-line no-async-promise-executor return new Promise<void>(async resolve => { try { - //Check if price exist in database + // Check if price exist in database const existingPrice = await fps.checkIfPriceExists(remotePrice) if (existingPrice) { - //Check if the remote price is more recent + // Check if the remote price is more recent if ( existingPrice.UpdatedAt && remotePrice.UpdatedAt && @@ -67,7 +67,7 @@ const synchroPricesToUpdate = async ( 'debug', `Price exist in db but not up to date, updating it` ) - //If a price has been updated, set the oldest startDate of the edited price so we can redo aggregation + // If a price has been updated, set the oldest startDate of the edited price so we can redo aggregation if (firstEditedPrice === null) { firstEditedPrice = remotePrice.startDate } @@ -75,7 +75,7 @@ const synchroPricesToUpdate = async ( firstEditedPrice = remotePrice.startDate } - //update this price in db + // update this price in db await fps.updatePrice(existingPrice, { price: remotePrice.price, UpdatedAt: remotePrice.UpdatedAt, @@ -83,7 +83,7 @@ const synchroPricesToUpdate = async ( endDate: remotePrice.endDate, }) } else if (!existingPrice.UpdatedAt && remotePrice.UpdatedAt) { - //updatedAt key doesn't exist in db + // updatedAt key doesn't exist in db await fps.updatePrice(existingPrice, { UpdatedAt: remotePrice.UpdatedAt, }) @@ -92,14 +92,14 @@ const synchroPricesToUpdate = async ( } } else { logStack('debug', `Price doesn't exist in db, creating new price`) - //If a price has been updated, set the oldest startDate of the edited price so we can redo aggregation + // If a price has been updated, set the oldest startDate of the edited price so we can redo aggregation if (firstEditedPrice === null) { firstEditedPrice = remotePrice.startDate } if (firstEditedPrice >= remotePrice.startDate) { firstEditedPrice = remotePrice.startDate } - //create price in db + // create price in db await fps.createPrice(remotePrice) } } catch (error) { @@ -239,7 +239,7 @@ const applyPrices = async (client: Client, fluidType: FluidType) => { const cdm = new ConsumptionDataManager(client) const qr = new QueryRunner(client) - //Synchro dbprices with remote prices + // Synchro dbprices with remote prices const firstEditedPriceDate = await synchroPricesToUpdate(client, fluidType) const firstDataDate = await cdm.fetchAllFirstDateData([fluidType]) const prices = await fluidsPricesService.getAllPrices() @@ -326,7 +326,7 @@ const applyPrices = async (client: Client, fluidType: FluidType) => { // If lastItem has a price, skip this day (in order to save perf) const lastItem = data?.data && data.data[data.data.length - 1] if (lastItem && priceData) { - //if a price has been updated in backoffice re-calculates all price from the firstEditedPriceDate + // if a price has been updated in backoffice re-calculates all price from the firstEditedPriceDate data && data.data.forEach((element: DataloadEntity) => { element.price = element.load * priceData.price diff --git a/yarn.lock b/yarn.lock index 644998649..f2c2ae1fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -139,7 +139,7 @@ json5 "^2.2.1" semver "^6.3.0" -"@babel/eslint-parser@7.18.9", "@babel/eslint-parser@^7.16.3": +"@babel/eslint-parser@^7.16.3": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.18.9.tgz#255a63796819a97b7578751bb08ab9f2a375a031" integrity sha512-KzSGpMBggz4fKbRbWLNyPVTuQr6cmCcBhOyXTw/fieOVaw5oYAwcAj4a7UKcDYCPxQq+CG1NCDZH9e2JTXquiQ== @@ -1692,35 +1692,11 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/eslintrc@^1.3.1": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.2.tgz#58b69582f3b7271d8fa67fe5251767a5b38ea356" - integrity sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.4.0" - globals "^13.15.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - "@gar/promisify@^1.0.1": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -"@humanwhocodes/config-array@^0.10.4": - version "0.10.4" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.4.tgz#01e7366e57d2ad104feea63e72248f22015c520c" - integrity sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw== - dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.4" - "@humanwhocodes/config-array@^0.5.0": version "0.5.0" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" @@ -1739,16 +1715,6 @@ debug "^4.1.1" minimatch "^3.0.4" -"@humanwhocodes/gitignore-to-minimatch@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d" - integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA== - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - "@humanwhocodes/object-schema@^1.2.0", "@humanwhocodes/object-schema@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" @@ -3017,21 +2983,6 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@5.36.0": - version "5.36.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.36.0.tgz#8f159c4cdb3084eb5d4b72619a2ded942aa109e5" - integrity sha512-X3In41twSDnYRES7hO2xna4ZC02SY05UN9sGW//eL1P5k4CKfvddsdC2hOq0O3+WU1wkCPQkiTY9mzSnXKkA0w== - dependencies: - "@typescript-eslint/scope-manager" "5.36.0" - "@typescript-eslint/type-utils" "5.36.0" - "@typescript-eslint/utils" "5.36.0" - debug "^4.3.4" - functional-red-black-tree "^1.0.1" - ignore "^5.2.0" - regexpp "^3.2.0" - semver "^7.3.7" - tsutils "^3.21.0" - "@typescript-eslint/eslint-plugin@^5.37.0": version "5.37.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.37.0.tgz#5ccdd5d9004120f28fc6e717fb4b5c9bddcfbc04" @@ -3047,16 +2998,6 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@5.36.0": - version "5.36.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.36.0.tgz#c08883073fb65acaafd268a987fd2314ce80c789" - integrity sha512-dlBZj7EGB44XML8KTng4QM0tvjI8swDh8MdpE5NX5iHWgWEfIuqSfSE+GPeCrCdj7m4tQLuevytd57jNDXJ2ZA== - dependencies: - "@typescript-eslint/scope-manager" "5.36.0" - "@typescript-eslint/types" "5.36.0" - "@typescript-eslint/typescript-estree" "5.36.0" - debug "^4.3.4" - "@typescript-eslint/parser@^5.10.0": version "5.30.5" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.30.5.tgz#f667c34e4e4c299d98281246c9b1e68c03a92522" @@ -3085,14 +3026,6 @@ "@typescript-eslint/types" "5.30.5" "@typescript-eslint/visitor-keys" "5.30.5" -"@typescript-eslint/scope-manager@5.36.0": - version "5.36.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.36.0.tgz#f4f859913add160318c0a5daccd3a030d1311530" - integrity sha512-PZUC9sz0uCzRiuzbkh6BTec7FqgwXW03isumFVkuPw/Ug/6nbAqPUZaRy4w99WCOUuJTjhn3tMjsM94NtEj64g== - dependencies: - "@typescript-eslint/types" "5.36.0" - "@typescript-eslint/visitor-keys" "5.36.0" - "@typescript-eslint/scope-manager@5.37.0": version "5.37.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.37.0.tgz#044980e4f1516a774a418dafe701a483a6c9f9ca" @@ -3101,16 +3034,6 @@ "@typescript-eslint/types" "5.37.0" "@typescript-eslint/visitor-keys" "5.37.0" -"@typescript-eslint/type-utils@5.36.0": - version "5.36.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.36.0.tgz#5d2f94a36a298ae240ceca54b3bc230be9a99f0a" - integrity sha512-W/E3yJFqRYsjPljJ2gy0YkoqLJyViWs2DC6xHkXcWyhkIbCDdaVnl7mPLeQphVI+dXtY05EcXFzWLXhq8Mm/lQ== - dependencies: - "@typescript-eslint/typescript-estree" "5.36.0" - "@typescript-eslint/utils" "5.36.0" - debug "^4.3.4" - tsutils "^3.21.0" - "@typescript-eslint/type-utils@5.37.0": version "5.37.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.37.0.tgz#43ed2f567ada49d7e33a6e4b6f9babd060445fe5" @@ -3126,16 +3049,16 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.5.tgz#36a0c05a72af3623cdf9ee8b81ea743b7de75a98" integrity sha512-kZ80w/M2AvsbRvOr3PjaNh6qEW1LFqs2pLdo2s5R38B2HYXG8Z0PP48/4+j1QHJFL3ssHIbJ4odPRS8PlHrFfw== -"@typescript-eslint/types@5.36.0": - version "5.36.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.36.0.tgz#cde7b94d1c09a4f074f46db99e7bd929fb0a5559" - integrity sha512-3JJuLL1r3ljRpFdRPeOtgi14Vmpx+2JcR6gryeORmW3gPBY7R1jNYoq4yBN1L//ONZjMlbJ7SCIwugOStucYiQ== - "@typescript-eslint/types@5.37.0": version "5.37.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.37.0.tgz#09e4870a5f3af7af3f84e08d792644a87d232261" integrity sha512-3frIJiTa5+tCb2iqR/bf7XwU20lnU05r/sgPJnRpwvfZaqCJBrl8Q/mw9vr3NrNdB/XtVyMA0eppRMMBqdJ1bA== +"@typescript-eslint/types@5.44.0": + version "5.44.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.44.0.tgz#f3f0b89aaff78f097a2927fe5688c07e786a0241" + integrity sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ== + "@typescript-eslint/typescript-estree@5.30.5": version "5.30.5" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.5.tgz#c520e4eba20551c4ec76af8d344a42eb6c9767bb" @@ -3149,19 +3072,6 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.36.0": - version "5.36.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.0.tgz#0acce61b4850bdb0e578f0884402726680608789" - integrity sha512-EW9wxi76delg/FS9+WV+fkPdwygYzRrzEucdqFVWXMQWPOjFy39mmNNEmxuO2jZHXzSQTXzhxiU1oH60AbIw9A== - dependencies: - "@typescript-eslint/types" "5.36.0" - "@typescript-eslint/visitor-keys" "5.36.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - "@typescript-eslint/typescript-estree@5.37.0": version "5.37.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.37.0.tgz#956dcf5c98363bcb97bdd5463a0a86072ff79355" @@ -3175,18 +3085,6 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.36.0": - version "5.36.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.36.0.tgz#104c864ecc1448417606359275368bf3872bbabb" - integrity sha512-wAlNhXXYvAAUBbRmoJDywF/j2fhGLBP4gnreFvYvFbtlsmhMJ4qCKVh/Z8OP4SgGR3xbciX2nmG639JX0uw1OQ== - dependencies: - "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.36.0" - "@typescript-eslint/types" "5.36.0" - "@typescript-eslint/typescript-estree" "5.36.0" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" - "@typescript-eslint/utils@5.37.0": version "5.37.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.37.0.tgz#7784cb8e91390c4f90ccaffd24a0cf9874df81b2" @@ -3207,14 +3105,6 @@ "@typescript-eslint/types" "5.30.5" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@5.36.0": - version "5.36.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.0.tgz#565d35a5ca00d00a406a942397ead2cb190663ba" - integrity sha512-pdqSJwGKueOrpjYIex0T39xarDt1dn4p7XJ+6FqBWugNQwXlNGC5h62qayAIYZ/RPPtD+ButDWmpXT1eGtiaYg== - dependencies: - "@typescript-eslint/types" "5.36.0" - eslint-visitor-keys "^3.3.0" - "@typescript-eslint/visitor-keys@5.37.0": version "5.37.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz#7b72dd343295ea11e89b624995abc7103c554eee" @@ -3223,6 +3113,14 @@ "@typescript-eslint/types" "5.37.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@5.44.0": + version "5.44.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz#10740dc28902bb903d12ee3a005cc3a70207d433" + integrity sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ== + dependencies: + "@typescript-eslint/types" "5.44.0" + eslint-visitor-keys "^3.3.0" + "@webassemblyjs/ast@1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" @@ -3437,11 +3335,6 @@ acorn@^8.2.4, acorn@^8.7.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== -acorn@^8.8.0: - version "8.8.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" - integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== - add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -7333,23 +7226,6 @@ eslint-config-cozy-app@1.5.0: eslint-plugin-vue "5.2.3" prettier "1.18.2" -eslint-config-cozy-app@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-cozy-app/-/eslint-config-cozy-app-5.1.0.tgz#17cf39c01edf587512164aaf340a139f65bc9bb7" - integrity sha512-S5dILPftGUzbFJM8bLCegTqj6kHyU+9mXMoa+jd06ARenvcqE8TQuDhGLhI6z/EdpIlXBNBED/eBQZ+fyyhDXQ== - dependencies: - "@babel/eslint-parser" "7.18.9" - "@typescript-eslint/eslint-plugin" "5.36.0" - "@typescript-eslint/parser" "5.36.0" - eslint "8.23.0" - eslint-config-prettier "8.5.0" - eslint-plugin-prettier "4.2.1" - eslint-plugin-promise "6.0.1" - eslint-plugin-react "7.31.1" - eslint-plugin-react-hooks "4.6.0" - prettier "2.7.1" - typescript "4.8.2" - eslint-config-prettier@4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-4.3.0.tgz#c55c1fcac8ce4518aeb77906984e134d9eb5a4f0" @@ -7357,7 +7233,7 @@ eslint-config-prettier@4.3.0: dependencies: get-stdin "^6.0.0" -eslint-config-prettier@8.5.0, eslint-config-prettier@^8.5.0: +eslint-config-prettier@^8.5.0: version "8.5.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== @@ -7380,18 +7256,13 @@ eslint-plugin-prettier@3.1.2: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-prettier@4.2.1, eslint-plugin-prettier@^4.2.1: +eslint-plugin-prettier@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-promise@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz#a8cddf96a67c4059bdabf4d724a29572188ae423" - integrity sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw== - eslint-plugin-react-hooks@2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.3.0.tgz#53e073961f1f5ccf8dd19558036c1fac8c29d99a" @@ -7402,11 +7273,6 @@ eslint-plugin-react-hooks@4.0.4: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.0.4.tgz#aed33b4254a41b045818cacb047b81e6df27fa58" integrity sha512-equAdEIsUETLFNCmmCkiCGq6rkSK5MoJhXFPFYeUebcjKgBmWWcgVOqZyQC8Bv1BwVCnTq9tBxgJFgAJTWoJtA== -eslint-plugin-react-hooks@4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" - integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== - eslint-plugin-react-hooks@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz#318dbf312e06fab1c835a4abef00121751ac1172" @@ -7445,26 +7311,6 @@ eslint-plugin-react@7.19.0: string.prototype.matchall "^4.0.2" xregexp "^4.3.0" -eslint-plugin-react@7.31.1: - version "7.31.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.31.1.tgz#d29793ed27743f3ed8a473c347b1bf5a0a8fb9af" - integrity sha512-j4/2xWqt/R7AZzG8CakGHA6Xa/u7iR8Q3xCxY+AUghdT92bnIDOBEefV456OeH0QvBcroVc0eyvrrLSyQGYIfg== - dependencies: - array-includes "^3.1.5" - array.prototype.flatmap "^1.3.0" - doctrine "^2.1.0" - estraverse "^5.3.0" - jsx-ast-utils "^2.4.1 || ^3.0.0" - minimatch "^3.1.2" - object.entries "^1.1.5" - object.fromentries "^2.0.5" - object.hasown "^1.1.1" - object.values "^1.1.5" - prop-types "^15.8.1" - resolve "^2.0.0-next.3" - semver "^6.3.0" - string.prototype.matchall "^4.0.7" - eslint-plugin-react@7.31.8: version "7.31.8" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.31.8.tgz#3a4f80c10be1bcbc8197be9e8b641b2a3ef219bf" @@ -7602,51 +7448,6 @@ eslint@5.16.0: table "^5.2.3" text-table "^0.2.0" -eslint@8.23.0: - version "8.23.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.0.tgz#a184918d288820179c6041bb3ddcc99ce6eea040" - integrity sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA== - dependencies: - "@eslint/eslintrc" "^1.3.1" - "@humanwhocodes/config-array" "^0.10.4" - "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" - "@humanwhocodes/module-importer" "^1.0.1" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - functional-red-black-tree "^1.0.1" - glob-parent "^6.0.1" - globals "^13.15.0" - globby "^11.1.0" - grapheme-splitter "^1.0.4" - ignore "^5.2.0" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" - strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" - text-table "^0.2.0" - eslint@^7.32.0: version "7.32.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" @@ -7770,15 +7571,6 @@ espree@^9.0.0, espree@^9.3.2: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.3.0" -espree@^9.4.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" - integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== - dependencies: - acorn "^8.8.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" - esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" @@ -8751,11 +8543,6 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -13359,7 +13146,7 @@ prettier@1.18.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw== -prettier@2.7.1, prettier@^2.5.1, prettier@^2.7.1: +prettier@^2.5.1, prettier@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== @@ -16198,11 +15985,6 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typescript@4.8.2: - version "4.8.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790" - integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw== - typescript@^4.0.0, typescript@^4.5.4: version "4.7.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" -- GitLab