diff --git a/.eslintrc.js b/.eslintrc.js index 2b93e382d8..2559631af4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -57,7 +57,7 @@ module.exports = { 'no-param-reassign': ['error', { props: false }], 'import/prefer-default-export': 'off', 'import/no-cycle': 'off', - 'no-console': 'off', + 'no-console': 'error', 'eol-last': ['error', 'always'], 'no-debugger': 'error', 'no-nested-ternary': 'off', diff --git a/couchdb-cleanup.sh b/couchdb-cleanup.sh new file mode 100755 index 0000000000..2959ec2dbe --- /dev/null +++ b/couchdb-cleanup.sh @@ -0,0 +1,3 @@ +#!/bin/zsh + +docker-compose down -v --rmi all --remove-orphans diff --git a/couchdb-init.sh b/couchdb-init.sh new file mode 100755 index 0000000000..2d0de80ad8 --- /dev/null +++ b/couchdb-init.sh @@ -0,0 +1,3 @@ +#!/bin/zsh + +docker-compose up --build -d diff --git a/scripts/check-translations/index.ts b/scripts/check-translations/index.ts index dbca8fb590..28ea514f7d 100644 --- a/scripts/check-translations/index.ts +++ b/scripts/check-translations/index.ts @@ -1,3 +1,5 @@ +/* eslint-disable no-console */ + import chalk from 'chalk' import { ResourceKey } from 'i18next' diff --git a/src/App.tsx b/src/App.tsx index 59c9314515..480178220e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,3 +1,5 @@ +/* eslint-disable no-console */ + import { Spinner } from '@hospitalrun/components' import React, { Suspense, useEffect, useState } from 'react' import { ReactQueryDevtools } from 'react-query-devtools' diff --git a/src/__tests__/incidents/hooks/useReportIncident.test.tsx b/src/__tests__/incidents/hooks/useReportIncident.test.tsx index b716e863a3..4bb0bd8511 100644 --- a/src/__tests__/incidents/hooks/useReportIncident.test.tsx +++ b/src/__tests__/incidents/hooks/useReportIncident.test.tsx @@ -1,3 +1,5 @@ +/* eslint-disable no-console */ + import { subDays } from 'date-fns' import shortid from 'shortid' diff --git a/src/__tests__/incidents/report/ReportIncident.test.tsx b/src/__tests__/incidents/report/ReportIncident.test.tsx index 383cdb85dd..4e3c2ee2da 100644 --- a/src/__tests__/incidents/report/ReportIncident.test.tsx +++ b/src/__tests__/incidents/report/ReportIncident.test.tsx @@ -1,3 +1,5 @@ +/* eslint-disable no-console */ + import { Button } from '@hospitalrun/components' import { mount, ReactWrapper } from 'enzyme' import { createMemoryHistory } from 'history' diff --git a/src/__tests__/patients/allergies/NewAllergyModal.test.tsx b/src/__tests__/patients/allergies/NewAllergyModal.test.tsx index 9d471f2dd7..4ba0e8acf2 100644 --- a/src/__tests__/patients/allergies/NewAllergyModal.test.tsx +++ b/src/__tests__/patients/allergies/NewAllergyModal.test.tsx @@ -1,3 +1,5 @@ +/* eslint-disable no-console */ + import { Modal, Alert } from '@hospitalrun/components' import { mount } from 'enzyme' import React from 'react' diff --git a/src/__tests__/patients/hooks/useAddAllergy.test.tsx b/src/__tests__/patients/hooks/useAddAllergy.test.tsx index 4a035a3320..813f4eeb45 100644 --- a/src/__tests__/patients/hooks/useAddAllergy.test.tsx +++ b/src/__tests__/patients/hooks/useAddAllergy.test.tsx @@ -1,3 +1,5 @@ +/* eslint-disable no-console */ + import useAddAllergy from '../../../patients/hooks/useAddAllergy' import * as validateAllergy from '../../../patients/util/validate-allergy' import PatientRepository from '../../../shared/db/PatientRepository' diff --git a/src/shared/config/pouchdb.ts b/src/shared/config/pouchdb.ts index cb4c3fdb90..5566b53094 100644 --- a/src/shared/config/pouchdb.ts +++ b/src/shared/config/pouchdb.ts @@ -26,14 +26,7 @@ if (process.env.NODE_ENV === 'test') { }) localDb = new PouchDB('local_hospitalrun') - localDb - .sync(serverDb, { live: true, retry: true }) - .on('change', (info) => { - console.log(info) - }) - .on('error', (info) => { - console.error(info) - }) + localDb.sync(serverDb, { live: true, retry: true }) } export const schema = [