diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 22a366d7d..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - root: true, - extends: ["eslint-config-commons-ui/next"], - settings: { - next: { - rootDir: "apps/*/", - }, - }, -}; diff --git a/apps/charterafrica/.eslintignore b/apps/charterafrica/.eslintignore deleted file mode 100644 index 5e144fe5d..000000000 --- a/apps/charterafrica/.eslintignore +++ /dev/null @@ -1,39 +0,0 @@ -# dependencies -node_modules -.pnp -.pnp.js -.pnpm-debug.log - -# typescript -dist/ - -# testing -coverage - -# next.js -.next/ -out/ - -# payload -build/ - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Vercel -.vercel -.now - -# turbo -.turbo -test-results/ -playwright-report/ - -# AGA Infographic -public/infographic diff --git a/apps/charterafrica/.eslintrc.js b/apps/charterafrica/.eslintrc.js deleted file mode 100644 index 468a5ff74..000000000 --- a/apps/charterafrica/.eslintrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - root: true, - extends: ["eslint-config-commons-ui/next"], - settings: { - "import/resolver": { - webpack: { - config: "./eslint.webpack.config.js", - }, - }, - }, -}; diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index 02a78d66b..b2234b0ee 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -28,7 +28,7 @@ "dev": "NODE_OPTIONS='--inspect' TS_NODE_PROJECT=tsconfig.server.json tsx server.ts", "start": "PAYLOAD_CONFIG_PATH=${PAYLOAD_CONFIG_PATH:-dist/payload.config.js} NODE_ENV=${NODE_ENV:-production} node dist/server.js", "lint-check": "TIMING=1 eslint './'", - "lint": "TIMING=1 eslint --fix './'", + "lint": "TIMING=1 eslint --flag unstable_config_lookup_from_file --fix './'", "jest": "jest", "playwright": "npx playwright test", "clean": "rm -rf .next .turbo build dist node_modules", @@ -62,6 +62,7 @@ "@sentry/nextjs": "catalog:", "airtable": "catalog:", "dotenv": "catalog:", + "eslint-plugin-react-hooks": "catalog:", "express": "catalog:", "leaflet": "catalog:", "migrate-mongo": "catalog:", diff --git a/apps/charterafrica/playwright.config.js b/apps/charterafrica/playwright.config.js index fb3f6acc8..f0278147c 100644 --- a/apps/charterafrica/playwright.config.js +++ b/apps/charterafrica/playwright.config.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ const defaultConfig = require("playwright-config-commons-ui"); const { use, webServer } = defaultConfig; diff --git a/apps/charterafrica/public/infographic/run_time_config.js b/apps/charterafrica/public/infographic/run_time_config.js index 008ade406..049194a51 100644 --- a/apps/charterafrica/public/infographic/run_time_config.js +++ b/apps/charterafrica/public/infographic/run_time_config.js @@ -1,7 +1,7 @@ -window.data_file = './data/data.json'; -window.data_country_file = './data/countries.json'; -const s = document.createElement('script'); -const n = document.getElementsByTagName('script')[0]; -s.async = 1; -s.src = './static/js/bundle.js'; -n.parentNode.insertBefore(s, n); +window.data_file = './data/data.json'; +window.data_country_file = './data/countries.json'; +const s = document.createElement('script'); +const n = document.getElementsByTagName('script')[0]; +s.async = 1; +s.src = './static/js/bundle.js'; +n.parentNode.insertBefore(s, n); diff --git a/apps/charterafrica/src/components/Accordion/Accordion.test.js b/apps/charterafrica/src/components/Accordion/Accordion.test.js index f6bf976da..d377bfb96 100644 --- a/apps/charterafrica/src/components/Accordion/Accordion.test.js +++ b/apps/charterafrica/src/components/Accordion/Accordion.test.js @@ -5,7 +5,6 @@ import Accordion from "./Accordion"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Articles/Articles.test.js b/apps/charterafrica/src/components/Articles/Articles.test.js index 9a3344519..c652acd7b 100644 --- a/apps/charterafrica/src/components/Articles/Articles.test.js +++ b/apps/charterafrica/src/components/Articles/Articles.test.js @@ -5,7 +5,6 @@ import Articles from "./Articles"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/BackgroundBox/BackgroundBox.test.js b/apps/charterafrica/src/components/BackgroundBox/BackgroundBox.test.js index 1bf286c70..cb65a7de7 100644 --- a/apps/charterafrica/src/components/BackgroundBox/BackgroundBox.test.js +++ b/apps/charterafrica/src/components/BackgroundBox/BackgroundBox.test.js @@ -5,7 +5,6 @@ import BackgroundBox from "./BackgroundBox"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/charterafrica/src/components/ComboBox/ComboBox.test.js b/apps/charterafrica/src/components/ComboBox/ComboBox.test.js index c7010439c..07200a548 100644 --- a/apps/charterafrica/src/components/ComboBox/ComboBox.test.js +++ b/apps/charterafrica/src/components/ComboBox/ComboBox.test.js @@ -6,7 +6,6 @@ import ComboBox from "./ComboBox"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Comments/Comments.test.js b/apps/charterafrica/src/components/Comments/Comments.test.js index 861433cc9..ef06da0e8 100644 --- a/apps/charterafrica/src/components/Comments/Comments.test.js +++ b/apps/charterafrica/src/components/Comments/Comments.test.js @@ -5,7 +5,6 @@ import Comments from "./Comments"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/CommunityPlatforms/CommunityPlatforms.test.js b/apps/charterafrica/src/components/CommunityPlatforms/CommunityPlatforms.test.js index f1f700fb8..ccba07624 100644 --- a/apps/charterafrica/src/components/CommunityPlatforms/CommunityPlatforms.test.js +++ b/apps/charterafrica/src/components/CommunityPlatforms/CommunityPlatforms.test.js @@ -5,7 +5,6 @@ import CommunityPlatforms from "./CommunityPlatforms"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Consultations/Consultations.test.js b/apps/charterafrica/src/components/Consultations/Consultations.test.js index 1a9285286..a87cd6d3a 100644 --- a/apps/charterafrica/src/components/Consultations/Consultations.test.js +++ b/apps/charterafrica/src/components/Consultations/Consultations.test.js @@ -5,7 +5,6 @@ import Consultations from "./Consultations"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/ContributorCard/ContributorCard.test.js b/apps/charterafrica/src/components/ContributorCard/ContributorCard.test.js index 90b2926c1..94761eadf 100644 --- a/apps/charterafrica/src/components/ContributorCard/ContributorCard.test.js +++ b/apps/charterafrica/src/components/ContributorCard/ContributorCard.test.js @@ -5,7 +5,6 @@ import ContributorCard from "./ContributorCard"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Dataset/Dataset.test.js b/apps/charterafrica/src/components/Dataset/Dataset.test.js index 7a43e0bc3..d4f45473f 100644 --- a/apps/charterafrica/src/components/Dataset/Dataset.test.js +++ b/apps/charterafrica/src/components/Dataset/Dataset.test.js @@ -5,7 +5,6 @@ import Dataset from "./Dataset"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/DatasetCard/DatasetCard.test.js b/apps/charterafrica/src/components/DatasetCard/DatasetCard.test.js index c6b9acefb..be1e3b217 100644 --- a/apps/charterafrica/src/components/DatasetCard/DatasetCard.test.js +++ b/apps/charterafrica/src/components/DatasetCard/DatasetCard.test.js @@ -5,7 +5,6 @@ import DatasetCard from "./DatasetCard"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Datasets/DatasetFilterBar.test.js b/apps/charterafrica/src/components/Datasets/DatasetFilterBar.test.js index 2d6945431..793cea50d 100644 --- a/apps/charterafrica/src/components/Datasets/DatasetFilterBar.test.js +++ b/apps/charterafrica/src/components/Datasets/DatasetFilterBar.test.js @@ -5,7 +5,6 @@ import DatasetFilterBar from "./DatasetFilterBar"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Datasets/Datasets.test.js b/apps/charterafrica/src/components/Datasets/Datasets.test.js index 1dc7a6dde..0de070a11 100644 --- a/apps/charterafrica/src/components/Datasets/Datasets.test.js +++ b/apps/charterafrica/src/components/Datasets/Datasets.test.js @@ -5,7 +5,6 @@ import Datasets from "./Datasets"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/DesktopNavBar/DesktopNavBar.test.js b/apps/charterafrica/src/components/DesktopNavBar/DesktopNavBar.test.js index 53eeb8904..320c11ff3 100644 --- a/apps/charterafrica/src/components/DesktopNavBar/DesktopNavBar.test.js +++ b/apps/charterafrica/src/components/DesktopNavBar/DesktopNavBar.test.js @@ -5,7 +5,6 @@ import DesktopNavBar from "./DesktopNavBar"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Document/Document.test.js b/apps/charterafrica/src/components/Document/Document.test.js index cd023c600..9c7bf4a0a 100644 --- a/apps/charterafrica/src/components/Document/Document.test.js +++ b/apps/charterafrica/src/components/Document/Document.test.js @@ -5,7 +5,6 @@ import Document from "./Document"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/DocumentCard/DocumentCard.test.js b/apps/charterafrica/src/components/DocumentCard/DocumentCard.test.js index 077fe319a..9b98ed0c1 100644 --- a/apps/charterafrica/src/components/DocumentCard/DocumentCard.test.js +++ b/apps/charterafrica/src/components/DocumentCard/DocumentCard.test.js @@ -5,7 +5,6 @@ import DocumentCard from "./DocumentCard"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Documents/DocumentFilterBar.test.js b/apps/charterafrica/src/components/Documents/DocumentFilterBar.test.js index af97a2105..0dde007c2 100644 --- a/apps/charterafrica/src/components/Documents/DocumentFilterBar.test.js +++ b/apps/charterafrica/src/components/Documents/DocumentFilterBar.test.js @@ -5,7 +5,6 @@ import DocumentFilterBar from "./DocumentFilterBar"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Documents/Documents.test.js b/apps/charterafrica/src/components/Documents/Documents.test.js index 30100eeb0..655768176 100644 --- a/apps/charterafrica/src/components/Documents/Documents.test.js +++ b/apps/charterafrica/src/components/Documents/Documents.test.js @@ -5,7 +5,6 @@ import Documents from "./Documents"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/DropdownMenu/DropdownMenu.test.js b/apps/charterafrica/src/components/DropdownMenu/DropdownMenu.test.js index b2023bf68..33571fd2f 100644 --- a/apps/charterafrica/src/components/DropdownMenu/DropdownMenu.test.js +++ b/apps/charterafrica/src/components/DropdownMenu/DropdownMenu.test.js @@ -5,7 +5,6 @@ import DropdownMenu from "./DropdownMenu"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Ecosystem/Ecosystem.test.js b/apps/charterafrica/src/components/Ecosystem/Ecosystem.test.js index b0d78770d..498ab015f 100644 --- a/apps/charterafrica/src/components/Ecosystem/Ecosystem.test.js +++ b/apps/charterafrica/src/components/Ecosystem/Ecosystem.test.js @@ -5,7 +5,6 @@ import Ecosystem from "./Ecosystem"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Entity/Entity.test.js b/apps/charterafrica/src/components/Entity/Entity.test.js index be8c92c5b..01ac1658c 100644 --- a/apps/charterafrica/src/components/Entity/Entity.test.js +++ b/apps/charterafrica/src/components/Entity/Entity.test.js @@ -5,7 +5,6 @@ import Entity from "./Entity"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Error/Error.test.js b/apps/charterafrica/src/components/Error/Error.test.js index f2e87606f..f4ea8ff24 100644 --- a/apps/charterafrica/src/components/Error/Error.test.js +++ b/apps/charterafrica/src/components/Error/Error.test.js @@ -5,7 +5,6 @@ import Error from "./Error"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/ErrorPage/ErrorPage.test.js b/apps/charterafrica/src/components/ErrorPage/ErrorPage.test.js index ea5305574..a127eb6c3 100644 --- a/apps/charterafrica/src/components/ErrorPage/ErrorPage.test.js +++ b/apps/charterafrica/src/components/ErrorPage/ErrorPage.test.js @@ -5,7 +5,6 @@ import ErrorPage from "./ErrorPage"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Explainers/Explainer.test.js b/apps/charterafrica/src/components/Explainers/Explainer.test.js index 0eee174a2..131add251 100644 --- a/apps/charterafrica/src/components/Explainers/Explainer.test.js +++ b/apps/charterafrica/src/components/Explainers/Explainer.test.js @@ -5,7 +5,6 @@ import Explainer from "./Explainer"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Explainers/Explainers.test.js b/apps/charterafrica/src/components/Explainers/Explainers.test.js index a03b55d35..45e37f103 100644 --- a/apps/charterafrica/src/components/Explainers/Explainers.test.js +++ b/apps/charterafrica/src/components/Explainers/Explainers.test.js @@ -5,7 +5,6 @@ import Explainers from "./Explainers"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/FAQ/FAQ.test.js b/apps/charterafrica/src/components/FAQ/FAQ.test.js index b89a60d55..ded1dee4d 100644 --- a/apps/charterafrica/src/components/FAQ/FAQ.test.js +++ b/apps/charterafrica/src/components/FAQ/FAQ.test.js @@ -5,7 +5,6 @@ import FAQ from "./FAQ"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/FeaturedPostCard/FeaturedPostCard.test.js b/apps/charterafrica/src/components/FeaturedPostCard/FeaturedPostCard.test.js index 5e90fb973..6c805782e 100644 --- a/apps/charterafrica/src/components/FeaturedPostCard/FeaturedPostCard.test.js +++ b/apps/charterafrica/src/components/FeaturedPostCard/FeaturedPostCard.test.js @@ -5,7 +5,6 @@ import FeaturedPostCard from "./FeaturedPostCard"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/FeaturedVideos/FeaturedVideo.test.js b/apps/charterafrica/src/components/FeaturedVideos/FeaturedVideo.test.js index e583a2fe7..ab440a3bf 100644 --- a/apps/charterafrica/src/components/FeaturedVideos/FeaturedVideo.test.js +++ b/apps/charterafrica/src/components/FeaturedVideos/FeaturedVideo.test.js @@ -5,7 +5,6 @@ import FeaturedVideos from "./FeaturedVideos"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/FeaturedVideos/FeaturedVideoCard.test.js b/apps/charterafrica/src/components/FeaturedVideos/FeaturedVideoCard.test.js index fd89bad81..177e24aba 100644 --- a/apps/charterafrica/src/components/FeaturedVideos/FeaturedVideoCard.test.js +++ b/apps/charterafrica/src/components/FeaturedVideos/FeaturedVideoCard.test.js @@ -5,7 +5,6 @@ import FeaturedVideoCard from "./FeaturedVideoCard"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/FlourishChart/FlourishChart.test.js b/apps/charterafrica/src/components/FlourishChart/FlourishChart.test.js index adb803754..530e9290c 100644 --- a/apps/charterafrica/src/components/FlourishChart/FlourishChart.test.js +++ b/apps/charterafrica/src/components/FlourishChart/FlourishChart.test.js @@ -5,7 +5,6 @@ import FlourishChart from "./FlourishChart"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/FocalCountries/FocalCountries.test.js b/apps/charterafrica/src/components/FocalCountries/FocalCountries.test.js index 709610cab..90e780d13 100644 --- a/apps/charterafrica/src/components/FocalCountries/FocalCountries.test.js +++ b/apps/charterafrica/src/components/FocalCountries/FocalCountries.test.js @@ -5,7 +5,6 @@ import FocalCountries from "./FocalCountries"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Footer/Footer.test.js b/apps/charterafrica/src/components/Footer/Footer.test.js index b5970956a..fad2d844e 100644 --- a/apps/charterafrica/src/components/Footer/Footer.test.js +++ b/apps/charterafrica/src/components/Footer/Footer.test.js @@ -5,7 +5,6 @@ import Footer from "./Footer"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Grantees/Grantees.test.js b/apps/charterafrica/src/components/Grantees/Grantees.test.js index fed719a69..f566b5494 100644 --- a/apps/charterafrica/src/components/Grantees/Grantees.test.js +++ b/apps/charterafrica/src/components/Grantees/Grantees.test.js @@ -5,7 +5,6 @@ import Grantees from "./Grantees"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/GuidingPrinciples/GuidingPrinciples.test.js b/apps/charterafrica/src/components/GuidingPrinciples/GuidingPrinciples.test.js index 11d457b86..19a74f39b 100644 --- a/apps/charterafrica/src/components/GuidingPrinciples/GuidingPrinciples.test.js +++ b/apps/charterafrica/src/components/GuidingPrinciples/GuidingPrinciples.test.js @@ -5,7 +5,6 @@ import GuidingPrinciples from "./GuidingPrinciples"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Helpdesk/Helpdesk.test.js b/apps/charterafrica/src/components/Helpdesk/Helpdesk.test.js index 157096cad..45d8b6373 100644 --- a/apps/charterafrica/src/components/Helpdesk/Helpdesk.test.js +++ b/apps/charterafrica/src/components/Helpdesk/Helpdesk.test.js @@ -5,7 +5,6 @@ import Helpdesk from "./Helpdesk"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/HelpdeskPageContent/HelpdeskPageContent.test.js b/apps/charterafrica/src/components/HelpdeskPageContent/HelpdeskPageContent.test.js index 62ff2bb3d..955d977cb 100644 --- a/apps/charterafrica/src/components/HelpdeskPageContent/HelpdeskPageContent.test.js +++ b/apps/charterafrica/src/components/HelpdeskPageContent/HelpdeskPageContent.test.js @@ -5,7 +5,6 @@ import HelpdeskPageContent from "./HelpdeskPageContent"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Hero/Hero.test.js b/apps/charterafrica/src/components/Hero/Hero.test.js index abd7c48e9..8a25607a0 100644 --- a/apps/charterafrica/src/components/Hero/Hero.test.js +++ b/apps/charterafrica/src/components/Hero/Hero.test.js @@ -5,7 +5,6 @@ import Hero from "./Hero"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Impressum/Impressum.test.js b/apps/charterafrica/src/components/Impressum/Impressum.test.js index 7e9887fe4..a98929570 100644 --- a/apps/charterafrica/src/components/Impressum/Impressum.test.js +++ b/apps/charterafrica/src/components/Impressum/Impressum.test.js @@ -5,7 +5,6 @@ import Impressum from "./Impressum"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Infographic/Infographic.test.js b/apps/charterafrica/src/components/Infographic/Infographic.test.js index 2ff8251ee..95e83a754 100644 --- a/apps/charterafrica/src/components/Infographic/Infographic.test.js +++ b/apps/charterafrica/src/components/Infographic/Infographic.test.js @@ -5,7 +5,6 @@ import Infographic from "./Infographic"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/LanguageButton/LanguageButton.test.js b/apps/charterafrica/src/components/LanguageButton/LanguageButton.test.js index 8153c486e..f77aeaf76 100644 --- a/apps/charterafrica/src/components/LanguageButton/LanguageButton.test.js +++ b/apps/charterafrica/src/components/LanguageButton/LanguageButton.test.js @@ -5,7 +5,6 @@ import LanguageButton from "./LanguageButton"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Layout/Layout.test.js b/apps/charterafrica/src/components/Layout/Layout.test.js index bb9a635f2..af671b517 100644 --- a/apps/charterafrica/src/components/Layout/Layout.test.js +++ b/apps/charterafrica/src/components/Layout/Layout.test.js @@ -5,7 +5,6 @@ import Layout from "./Layout"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/LineClampedRichTypography/LineClampedRichTypography.test.js b/apps/charterafrica/src/components/LineClampedRichTypography/LineClampedRichTypography.test.js index 36d1e9dd7..5236fa6b6 100644 --- a/apps/charterafrica/src/components/LineClampedRichTypography/LineClampedRichTypography.test.js +++ b/apps/charterafrica/src/components/LineClampedRichTypography/LineClampedRichTypography.test.js @@ -5,7 +5,6 @@ import LineClampedRichTypography from "./LineClampedRichTypography"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Logo/Logo.test.js b/apps/charterafrica/src/components/Logo/Logo.test.js index d331f70eb..cfae78c16 100644 --- a/apps/charterafrica/src/components/Logo/Logo.test.js +++ b/apps/charterafrica/src/components/Logo/Logo.test.js @@ -5,7 +5,6 @@ import Logo from "./Logo"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/LongForm/LongForm.test.js b/apps/charterafrica/src/components/LongForm/LongForm.test.js index e0e24f5f8..12d56d483 100644 --- a/apps/charterafrica/src/components/LongForm/LongForm.test.js +++ b/apps/charterafrica/src/components/LongForm/LongForm.test.js @@ -5,7 +5,6 @@ import LongForm from "./LongForm"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/LongFormMediaBlock/LongFormMediaBlock.test.js b/apps/charterafrica/src/components/LongFormMediaBlock/LongFormMediaBlock.test.js index 6d9a38d8c..bb9d7d2d3 100644 --- a/apps/charterafrica/src/components/LongFormMediaBlock/LongFormMediaBlock.test.js +++ b/apps/charterafrica/src/components/LongFormMediaBlock/LongFormMediaBlock.test.js @@ -5,7 +5,6 @@ import LongFormMediaBlock from "./LongFormMediaBlock"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/LongFormRichText/LongFormRichText.test.js b/apps/charterafrica/src/components/LongFormRichText/LongFormRichText.test.js index 546a4077e..ddd0e9dcb 100644 --- a/apps/charterafrica/src/components/LongFormRichText/LongFormRichText.test.js +++ b/apps/charterafrica/src/components/LongFormRichText/LongFormRichText.test.js @@ -5,7 +5,6 @@ import LongFormRichText from "./LongFormRichText"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/MobileNavBar/MobileNavBar.test.js b/apps/charterafrica/src/components/MobileNavBar/MobileNavBar.test.js index e87503402..95a089dff 100644 --- a/apps/charterafrica/src/components/MobileNavBar/MobileNavBar.test.js +++ b/apps/charterafrica/src/components/MobileNavBar/MobileNavBar.test.js @@ -5,7 +5,6 @@ import MobileNavBar from "./MobileNavBar"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Mooc/Mooc.test.js b/apps/charterafrica/src/components/Mooc/Mooc.test.js index 8fc2c6c92..5b5e92692 100644 --- a/apps/charterafrica/src/components/Mooc/Mooc.test.js +++ b/apps/charterafrica/src/components/Mooc/Mooc.test.js @@ -5,7 +5,6 @@ import Mooc from "./Mooc"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/NavBar/NavBar.test.js b/apps/charterafrica/src/components/NavBar/NavBar.test.js index 29daee25a..57cadce64 100644 --- a/apps/charterafrica/src/components/NavBar/NavBar.test.js +++ b/apps/charterafrica/src/components/NavBar/NavBar.test.js @@ -5,7 +5,6 @@ import NavBar from "./NavBar"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/NavBarDropdown/NavBarDropdown.test.js b/apps/charterafrica/src/components/NavBarDropdown/NavBarDropdown.test.js index 0f57b9378..0ef095a85 100644 --- a/apps/charterafrica/src/components/NavBarDropdown/NavBarDropdown.test.js +++ b/apps/charterafrica/src/components/NavBarDropdown/NavBarDropdown.test.js @@ -5,7 +5,6 @@ import NavBarDropdown from "./NavBarDropdown"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/NavBarNavList/NavBarNavList.test.js b/apps/charterafrica/src/components/NavBarNavList/NavBarNavList.test.js index 7ff0bac5e..775d051b3 100644 --- a/apps/charterafrica/src/components/NavBarNavList/NavBarNavList.test.js +++ b/apps/charterafrica/src/components/NavBarNavList/NavBarNavList.test.js @@ -5,7 +5,6 @@ import NavBarNavList from "./NavBarNavList"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/NavBarNavMenu/NavBarNavMenu.test.js b/apps/charterafrica/src/components/NavBarNavMenu/NavBarNavMenu.test.js index fe08f8046..5f90d0c5c 100644 --- a/apps/charterafrica/src/components/NavBarNavMenu/NavBarNavMenu.test.js +++ b/apps/charterafrica/src/components/NavBarNavMenu/NavBarNavMenu.test.js @@ -5,7 +5,6 @@ import NavBarNavMenu from "./NavBarNavMenu"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/NewsletterSubscription/NewsletterSubscription.test.js b/apps/charterafrica/src/components/NewsletterSubscription/NewsletterSubscription.test.js index b5e2a83cd..5c790f7f8 100644 --- a/apps/charterafrica/src/components/NewsletterSubscription/NewsletterSubscription.test.js +++ b/apps/charterafrica/src/components/NewsletterSubscription/NewsletterSubscription.test.js @@ -5,7 +5,6 @@ import NewsletterSubscription from "./NewsletterSubscription"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/NextPrevPagination/NextPrevPagination.test.js b/apps/charterafrica/src/components/NextPrevPagination/NextPrevPagination.test.js index 865c3ef58..4fa3ae21c 100644 --- a/apps/charterafrica/src/components/NextPrevPagination/NextPrevPagination.test.js +++ b/apps/charterafrica/src/components/NextPrevPagination/NextPrevPagination.test.js @@ -5,7 +5,6 @@ import NextPrevPagination from "./NextPrevPagination"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/NextPrevPagination/PaginationButton.test.js b/apps/charterafrica/src/components/NextPrevPagination/PaginationButton.test.js index 20945a1d9..e48f57f1c 100644 --- a/apps/charterafrica/src/components/NextPrevPagination/PaginationButton.test.js +++ b/apps/charterafrica/src/components/NextPrevPagination/PaginationButton.test.js @@ -5,7 +5,6 @@ import PaginationButton from "./PaginationButton"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/OpenCloseIcon/OpenCloseIcon.test.js b/apps/charterafrica/src/components/OpenCloseIcon/OpenCloseIcon.test.js index 14549ef62..d6cbcc23a 100644 --- a/apps/charterafrica/src/components/OpenCloseIcon/OpenCloseIcon.test.js +++ b/apps/charterafrica/src/components/OpenCloseIcon/OpenCloseIcon.test.js @@ -5,7 +5,6 @@ import OpenCloseIcon from "./OpenCloseIcon"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Opportunity/Opportunity.test.js b/apps/charterafrica/src/components/Opportunity/Opportunity.test.js index 1ef9c10e9..f030a3f28 100644 --- a/apps/charterafrica/src/components/Opportunity/Opportunity.test.js +++ b/apps/charterafrica/src/components/Opportunity/Opportunity.test.js @@ -5,7 +5,6 @@ import Opportunity from "./Opportunity"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/OpportunityCard/OpportunityCard.test.js b/apps/charterafrica/src/components/OpportunityCard/OpportunityCard.test.js index f362940da..2bacbb1e7 100644 --- a/apps/charterafrica/src/components/OpportunityCard/OpportunityCard.test.js +++ b/apps/charterafrica/src/components/OpportunityCard/OpportunityCard.test.js @@ -5,7 +5,6 @@ import OpportunityCard from "./OpportunityCard"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/OpportunityCards/OpportunityCardGrid.test.js b/apps/charterafrica/src/components/OpportunityCards/OpportunityCardGrid.test.js index afcd29c10..a3469d741 100644 --- a/apps/charterafrica/src/components/OpportunityCards/OpportunityCardGrid.test.js +++ b/apps/charterafrica/src/components/OpportunityCards/OpportunityCardGrid.test.js @@ -5,7 +5,6 @@ import OpportunityCardGrid from "./OpportunityCardGrid"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/OpportunityCards/OpportunityCardHeader.test.js b/apps/charterafrica/src/components/OpportunityCards/OpportunityCardHeader.test.js index 54108cf18..f140f998f 100644 --- a/apps/charterafrica/src/components/OpportunityCards/OpportunityCardHeader.test.js +++ b/apps/charterafrica/src/components/OpportunityCards/OpportunityCardHeader.test.js @@ -5,7 +5,6 @@ import OpportunityCardHeader from "./OpportunityCardHeader"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/OpportunityCards/OpportunityCards.test.js b/apps/charterafrica/src/components/OpportunityCards/OpportunityCards.test.js index 61dd10095..2d5fe9065 100644 --- a/apps/charterafrica/src/components/OpportunityCards/OpportunityCards.test.js +++ b/apps/charterafrica/src/components/OpportunityCards/OpportunityCards.test.js @@ -5,7 +5,6 @@ import OpportunityCards from "./OpportunityCards"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/OpportunityHeader/OpportunityHeader.test.js b/apps/charterafrica/src/components/OpportunityHeader/OpportunityHeader.test.js index f318752b3..0b9e25d91 100644 --- a/apps/charterafrica/src/components/OpportunityHeader/OpportunityHeader.test.js +++ b/apps/charterafrica/src/components/OpportunityHeader/OpportunityHeader.test.js @@ -5,7 +5,6 @@ import OpportunityHeader from "./OpportunityHeader"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/OpportunityPage/OpportunityPage.test.js b/apps/charterafrica/src/components/OpportunityPage/OpportunityPage.test.js index 1eddf6bd3..5353f9475 100644 --- a/apps/charterafrica/src/components/OpportunityPage/OpportunityPage.test.js +++ b/apps/charterafrica/src/components/OpportunityPage/OpportunityPage.test.js @@ -5,7 +5,6 @@ import OpportunityPage from "./OpportunityPage"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/OrganisationCard/OrganisationCard.test.js b/apps/charterafrica/src/components/OrganisationCard/OrganisationCard.test.js index b0af86b0f..47f90e883 100644 --- a/apps/charterafrica/src/components/OrganisationCard/OrganisationCard.test.js +++ b/apps/charterafrica/src/components/OrganisationCard/OrganisationCard.test.js @@ -5,7 +5,6 @@ import OrganisationCard from "./OrganisationCard"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/OrganisationCard/OrganisationImageLink.test.js b/apps/charterafrica/src/components/OrganisationCard/OrganisationImageLink.test.js index a1f31844a..70e6aa367 100644 --- a/apps/charterafrica/src/components/OrganisationCard/OrganisationImageLink.test.js +++ b/apps/charterafrica/src/components/OrganisationCard/OrganisationImageLink.test.js @@ -5,7 +5,6 @@ import OrganisationImageLink from "./OrganisationImageLink"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/PageDescription/PageDescription.test.js b/apps/charterafrica/src/components/PageDescription/PageDescription.test.js index 5f6ecce74..ef7c81664 100644 --- a/apps/charterafrica/src/components/PageDescription/PageDescription.test.js +++ b/apps/charterafrica/src/components/PageDescription/PageDescription.test.js @@ -5,7 +5,6 @@ import PageDescription from "./PageDescription"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/PageHeader/PageHeader.test.js b/apps/charterafrica/src/components/PageHeader/PageHeader.test.js index 2048083c6..d833f5b58 100644 --- a/apps/charterafrica/src/components/PageHeader/PageHeader.test.js +++ b/apps/charterafrica/src/components/PageHeader/PageHeader.test.js @@ -5,7 +5,6 @@ import PageHeader from "./PageHeader"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/PageInfo/PageInfo.test.js b/apps/charterafrica/src/components/PageInfo/PageInfo.test.js index 36b37dc84..591097472 100644 --- a/apps/charterafrica/src/components/PageInfo/PageInfo.test.js +++ b/apps/charterafrica/src/components/PageInfo/PageInfo.test.js @@ -5,7 +5,6 @@ import PageInfo from "./PageInfo"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Partners/Partners.test.js b/apps/charterafrica/src/components/Partners/Partners.test.js index 6678257ce..0a7ff4a7a 100644 --- a/apps/charterafrica/src/components/Partners/Partners.test.js +++ b/apps/charterafrica/src/components/Partners/Partners.test.js @@ -5,7 +5,6 @@ import Partners from "./Partners"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Popper/Popper.test.js b/apps/charterafrica/src/components/Popper/Popper.test.js index 16fb98c98..6c8e77fc4 100644 --- a/apps/charterafrica/src/components/Popper/Popper.test.js +++ b/apps/charterafrica/src/components/Popper/Popper.test.js @@ -5,7 +5,6 @@ import Popper from "./Popper"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Post/Post.test.js b/apps/charterafrica/src/components/Post/Post.test.js index 5d823d157..27cb083a9 100644 --- a/apps/charterafrica/src/components/Post/Post.test.js +++ b/apps/charterafrica/src/components/Post/Post.test.js @@ -5,7 +5,6 @@ import Post from "./Post"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/PostCard/PostCard.test.js b/apps/charterafrica/src/components/PostCard/PostCard.test.js index 6e780ed83..434fa7ca4 100644 --- a/apps/charterafrica/src/components/PostCard/PostCard.test.js +++ b/apps/charterafrica/src/components/PostCard/PostCard.test.js @@ -5,7 +5,6 @@ import PostCard from "./PostCard"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Repository/Repository.test.js b/apps/charterafrica/src/components/Repository/Repository.test.js index 38010a89b..3a1e6b949 100644 --- a/apps/charterafrica/src/components/Repository/Repository.test.js +++ b/apps/charterafrica/src/components/Repository/Repository.test.js @@ -5,7 +5,6 @@ import Repository from "./Repository"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Resources/Resources.test.js b/apps/charterafrica/src/components/Resources/Resources.test.js index d8939d2fb..25c78619b 100644 --- a/apps/charterafrica/src/components/Resources/Resources.test.js +++ b/apps/charterafrica/src/components/Resources/Resources.test.js @@ -5,7 +5,6 @@ import Resources from "./Resources"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/RichText/RichText.test.js b/apps/charterafrica/src/components/RichText/RichText.test.js index 7a5583efc..a00fa0760 100644 --- a/apps/charterafrica/src/components/RichText/RichText.test.js +++ b/apps/charterafrica/src/components/RichText/RichText.test.js @@ -5,7 +5,6 @@ import RichText from "./RichText"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/SearchInput/SearchInput.test.js b/apps/charterafrica/src/components/SearchInput/SearchInput.test.js index 629a372c7..6cc8f47d5 100644 --- a/apps/charterafrica/src/components/SearchInput/SearchInput.test.js +++ b/apps/charterafrica/src/components/SearchInput/SearchInput.test.js @@ -5,7 +5,6 @@ import SearchInput from "./SearchInput"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/charterafrica/src/components/ShareThisPage/ShareThisPage.test.js b/apps/charterafrica/src/components/ShareThisPage/ShareThisPage.test.js index e3cc6ab13..eced144b6 100644 --- a/apps/charterafrica/src/components/ShareThisPage/ShareThisPage.test.js +++ b/apps/charterafrica/src/components/ShareThisPage/ShareThisPage.test.js @@ -5,7 +5,6 @@ import ShareThisPage from "./ShareThisPage"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/SocialMediaBar/SocialMediaBar.test.js b/apps/charterafrica/src/components/SocialMediaBar/SocialMediaBar.test.js index f8726b270..a369fbfa9 100644 --- a/apps/charterafrica/src/components/SocialMediaBar/SocialMediaBar.test.js +++ b/apps/charterafrica/src/components/SocialMediaBar/SocialMediaBar.test.js @@ -5,7 +5,6 @@ import SocialMediaBar from "./SocialMediaBar"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/Spotlight/Spotlight.test.js b/apps/charterafrica/src/components/Spotlight/Spotlight.test.js index 2236230fc..d6598b476 100644 --- a/apps/charterafrica/src/components/Spotlight/Spotlight.test.js +++ b/apps/charterafrica/src/components/Spotlight/Spotlight.test.js @@ -5,7 +5,6 @@ import Spotlight from "./Spotlight"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/charterafrica/src/components/SpotlightCard/SpotlightCard.test.js b/apps/charterafrica/src/components/SpotlightCard/SpotlightCard.test.js index 20aa74fa7..a8ff7da8f 100644 --- a/apps/charterafrica/src/components/SpotlightCard/SpotlightCard.test.js +++ b/apps/charterafrica/src/components/SpotlightCard/SpotlightCard.test.js @@ -5,7 +5,6 @@ import SpotlightCard from "./SpotlightCard"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/charterafrica/src/components/StayInTouch/StayInTouch.test.js b/apps/charterafrica/src/components/StayInTouch/StayInTouch.test.js index 50b6bcf0a..fad2ae9a7 100644 --- a/apps/charterafrica/src/components/StayInTouch/StayInTouch.test.js +++ b/apps/charterafrica/src/components/StayInTouch/StayInTouch.test.js @@ -5,7 +5,6 @@ import StayInTouch from "./StayInTouch"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/charterafrica/src/components/Switch/Switch.test.js b/apps/charterafrica/src/components/Switch/Switch.test.js index afeab3546..5d0958662 100644 --- a/apps/charterafrica/src/components/Switch/Switch.test.js +++ b/apps/charterafrica/src/components/Switch/Switch.test.js @@ -5,7 +5,6 @@ import Switch from "./Switch"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/charterafrica/src/components/Tool/Tool.test.js b/apps/charterafrica/src/components/Tool/Tool.test.js index 8b1429892..859b8127c 100644 --- a/apps/charterafrica/src/components/Tool/Tool.test.js +++ b/apps/charterafrica/src/components/Tool/Tool.test.js @@ -5,7 +5,6 @@ import Tool from "./Tool"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/ToolCard/ToolCard.test.js b/apps/charterafrica/src/components/ToolCard/ToolCard.test.js index 8593e01dc..7aeae22bf 100644 --- a/apps/charterafrica/src/components/ToolCard/ToolCard.test.js +++ b/apps/charterafrica/src/components/ToolCard/ToolCard.test.js @@ -5,7 +5,6 @@ import ToolCard from "./ToolCard"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/components/YoutubeVideoPlayer/YoutubeVideoPlayer.test.js b/apps/charterafrica/src/components/YoutubeVideoPlayer/YoutubeVideoPlayer.test.js index f707e3083..67b6ce70b 100644 --- a/apps/charterafrica/src/components/YoutubeVideoPlayer/YoutubeVideoPlayer.test.js +++ b/apps/charterafrica/src/components/YoutubeVideoPlayer/YoutubeVideoPlayer.test.js @@ -5,7 +5,6 @@ import YoutubeVideoPlayer from "./YoutubeVideoPlayer"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/src/pages/[...slugs].test.js b/apps/charterafrica/src/pages/[...slugs].test.js index c4964c3af..4cc34434a 100644 --- a/apps/charterafrica/src/pages/[...slugs].test.js +++ b/apps/charterafrica/src/pages/[...slugs].test.js @@ -5,7 +5,6 @@ import Page from "./[...slugs].page"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/charterafrica/src/pages/_document.page.js b/apps/charterafrica/src/pages/_document.page.js index e65fe8581..b977fae5e 100644 --- a/apps/charterafrica/src/pages/_document.page.js +++ b/apps/charterafrica/src/pages/_document.page.js @@ -109,7 +109,6 @@ MyDocument.getInitialProps = async (ctx) => { const cache = createEmotionCache(); const { extractCriticalToChunks } = createEmotionServer(cache); - /* eslint-disable */ ctx.renderPage = () => originalRenderPage({ enhanceApp: (App) => @@ -117,7 +116,6 @@ MyDocument.getInitialProps = async (ctx) => { return ; }, }); - /* eslint-enable */ const initialProps = await Document.getInitialProps(ctx); // This is important. It prevents emotion to render invalid HTML. diff --git a/apps/charterafrica/src/pages/index.test.js b/apps/charterafrica/src/pages/index.test.js index 151afb0a3..c660c35db 100644 --- a/apps/charterafrica/src/pages/index.test.js +++ b/apps/charterafrica/src/pages/index.test.js @@ -5,7 +5,6 @@ import Index from "./index.page"; import theme from "@/charterafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/charterafrica/tsconfig.json b/apps/charterafrica/tsconfig.json index 72036a50b..181b98ddd 100644 --- a/apps/charterafrica/tsconfig.json +++ b/apps/charterafrica/tsconfig.json @@ -18,7 +18,8 @@ "@/charterafrica/*": ["./src/*"], "@/commons-ui/core/*": ["../../packages/commons-ui-core/src/*"], "@/commons-ui/next/*": ["../../packages/commons-ui-next/src/*"] - } + }, + "target": "ES2017" }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "exclude": ["build", "dist", "node_modules"] diff --git a/apps/civicsignalblog/.eslintignore b/apps/civicsignalblog/.eslintignore deleted file mode 100644 index 19d6cb9ac..000000000 --- a/apps/civicsignalblog/.eslintignore +++ /dev/null @@ -1,36 +0,0 @@ -# dependencies -node_modules -.pnp -.pnp.js -.pnpm-debug.log - -# typescript -dist/ - -# testing -coverage - -# next.js -.next/ -out/ - -# payload -build/ - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Vercel -.vercel -.now - -# turbo -.turbo -test-results/ -playwright-report/ diff --git a/apps/civicsignalblog/.eslintrc.js b/apps/civicsignalblog/.eslintrc.js deleted file mode 100644 index 4c66c3da2..000000000 --- a/apps/civicsignalblog/.eslintrc.js +++ /dev/null @@ -1,27 +0,0 @@ -module.exports = { - root: true, - extends: ["eslint-config-commons-ui/next"], - rules: { - "react/jsx-filename-extension": [1, { extensions: [".js", ".tsx"] }], // This rule allows JSX syntax in both .js and tsx files - // Disable requirement for importing file extensions for js and tsx files, without this we cant import custom components in Payload - "import/extensions": [ - "error", - "ignorePackages", - { - js: "never", - tsx: "never", - }, - ], - }, - settings: { - "import/resolver": { - webpack: { - config: "./eslint.webpack.config.js", - }, - typescript: { - alwaysTryTypes: false, // we mostly have JS thus we don't need types automatically resolved - project: "./tsconfig.json", - }, - }, - }, -}; diff --git a/apps/civicsignalblog/eslint.config.js b/apps/civicsignalblog/eslint.config.js new file mode 100644 index 000000000..cf8c9ee92 --- /dev/null +++ b/apps/civicsignalblog/eslint.config.js @@ -0,0 +1,32 @@ +const eslintConfig = require("eslint-config-commons-ui/next"); + +module.exports = [ + { + settings: { + "import/resolver": { + webpack: { + config: "./eslint.webpack.config.js", + }, + typescript: { + alwaysTryTypes: false, + project: "./tsconfig.json", + }, + }, + }, + }, + ...eslintConfig, + { + rules: { + "react/jsx-filename-extension": [1, { extensions: [".js", ".tsx"] }], // This rule allows JSX syntax in both .js and tsx files + // Disable requirement for importing file extensions for js and tsx files, without this we cant import custom components in Payload + "import/extensions": [ + "error", + "ignorePackages", + { + js: "never", + tsx: "never", + }, + ], + }, + }, +]; diff --git a/apps/civicsignalblog/package.json b/apps/civicsignalblog/package.json index 778831acc..16638265a 100644 --- a/apps/civicsignalblog/package.json +++ b/apps/civicsignalblog/package.json @@ -31,7 +31,7 @@ "start": "PAYLOAD_CONFIG_PATH=${PAYLOAD_CONFIG_PATH:-dist/payload.config.js} NODE_ENV=${NODE_ENV:-production} node dist/server.js", "dev": "NODE_OPTIONS='--inspect --conditions=dev' TS_NODE_PROJECT=tsconfig.server.json tsx server.ts", "lint-check": "TIMING=1 eslint './'", - "lint": "TIMING=1 eslint --fix './'", + "lint": "TIMING=1 next lint --fix './'", "jest": "jest", "playwright": "npx playwright test", "clean": "rm -rf .next .turbo build dist node_modules" diff --git a/apps/civicsignalblog/playwright.config.js b/apps/civicsignalblog/playwright.config.js index f46c5bd3b..3b722dce9 100644 --- a/apps/civicsignalblog/playwright.config.js +++ b/apps/civicsignalblog/playwright.config.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ const defaultConfig = require("playwright-config-commons-ui"); const { use, webServer } = defaultConfig; diff --git a/apps/civicsignalblog/src/components/ArticleCard/ArticleCard.test.js b/apps/civicsignalblog/src/components/ArticleCard/ArticleCard.test.js index fb6f471b3..c128e53f0 100644 --- a/apps/civicsignalblog/src/components/ArticleCard/ArticleCard.test.js +++ b/apps/civicsignalblog/src/components/ArticleCard/ArticleCard.test.js @@ -5,7 +5,6 @@ import ArticleCard from "./ArticleCard"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/ArticleCardContent/ArticleCardContent.test.js b/apps/civicsignalblog/src/components/ArticleCardContent/ArticleCardContent.test.js index a09c7cf26..b39602465 100644 --- a/apps/civicsignalblog/src/components/ArticleCardContent/ArticleCardContent.test.js +++ b/apps/civicsignalblog/src/components/ArticleCardContent/ArticleCardContent.test.js @@ -5,7 +5,6 @@ import ArticleCardContent from "./ArticleCardContent"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/ArticleCardList/ArticleCardList.test.js b/apps/civicsignalblog/src/components/ArticleCardList/ArticleCardList.test.js index b6409fd91..f339e827a 100644 --- a/apps/civicsignalblog/src/components/ArticleCardList/ArticleCardList.test.js +++ b/apps/civicsignalblog/src/components/ArticleCardList/ArticleCardList.test.js @@ -5,7 +5,6 @@ import ArticleCardList from "./ArticleCardList"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/ArticleCardMedia/ArticleCardMedia.test.js b/apps/civicsignalblog/src/components/ArticleCardMedia/ArticleCardMedia.test.js index ca9dc5f56..23f4ea76b 100644 --- a/apps/civicsignalblog/src/components/ArticleCardMedia/ArticleCardMedia.test.js +++ b/apps/civicsignalblog/src/components/ArticleCardMedia/ArticleCardMedia.test.js @@ -5,7 +5,6 @@ import ArticleCardMedia from "./ArticleCardMedia"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.test.js b/apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.test.js index 86ab3fc4e..18ccbcfbe 100644 --- a/apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.test.js +++ b/apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.test.js @@ -5,7 +5,6 @@ import ArticleGrid from "./ArticleGrid"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/ArticleHeader/ArticleHeader.test.js b/apps/civicsignalblog/src/components/ArticleHeader/ArticleHeader.test.js index d1a2f5aeb..d11072a98 100644 --- a/apps/civicsignalblog/src/components/ArticleHeader/ArticleHeader.test.js +++ b/apps/civicsignalblog/src/components/ArticleHeader/ArticleHeader.test.js @@ -5,7 +5,6 @@ import ArticleHeader from "./ArticleHeader"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/ArticlePage/ArticlePage.js b/apps/civicsignalblog/src/components/ArticlePage/ArticlePage.js index bd2cfa16e..045ba9f07 100644 --- a/apps/civicsignalblog/src/components/ArticlePage/ArticlePage.js +++ b/apps/civicsignalblog/src/components/ArticlePage/ArticlePage.js @@ -1,4 +1,3 @@ -/* eslint-disable camelcase */ import { Section } from "@commons-ui/core"; import { Figure, Link } from "@commons-ui/next"; import { Box } from "@mui/material"; diff --git a/apps/civicsignalblog/src/components/ArticlePage/ArticlePage.test.js b/apps/civicsignalblog/src/components/ArticlePage/ArticlePage.test.js index bb4e931ab..3e677e9ef 100644 --- a/apps/civicsignalblog/src/components/ArticlePage/ArticlePage.test.js +++ b/apps/civicsignalblog/src/components/ArticlePage/ArticlePage.test.js @@ -5,7 +5,6 @@ import ArticlePage from "./ArticlePage"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/Articles/Articles.test.js b/apps/civicsignalblog/src/components/Articles/Articles.test.js index 65070a1b7..2a216923e 100644 --- a/apps/civicsignalblog/src/components/Articles/Articles.test.js +++ b/apps/civicsignalblog/src/components/Articles/Articles.test.js @@ -5,7 +5,6 @@ import Articles from "./Articles"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/Author/Author.test.js b/apps/civicsignalblog/src/components/Author/Author.test.js index 819ecd57c..5b5e4be69 100644 --- a/apps/civicsignalblog/src/components/Author/Author.test.js +++ b/apps/civicsignalblog/src/components/Author/Author.test.js @@ -5,7 +5,6 @@ import Author from "./Author"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/Breadcrumbs/Breadcrumbs.test.js b/apps/civicsignalblog/src/components/Breadcrumbs/Breadcrumbs.test.js index fcc0330f8..752235c52 100644 --- a/apps/civicsignalblog/src/components/Breadcrumbs/Breadcrumbs.test.js +++ b/apps/civicsignalblog/src/components/Breadcrumbs/Breadcrumbs.test.js @@ -5,7 +5,6 @@ import Breadcrumbs from "./Breadcrumbs"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/CMSContent/CMSContent.test.js b/apps/civicsignalblog/src/components/CMSContent/CMSContent.test.js index e7dd61fe5..0d76eed1f 100644 --- a/apps/civicsignalblog/src/components/CMSContent/CMSContent.test.js +++ b/apps/civicsignalblog/src/components/CMSContent/CMSContent.test.js @@ -5,7 +5,6 @@ import CMSContent from "./CMSContent"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/ChoiceChip/ChoiceChip.test.js b/apps/civicsignalblog/src/components/ChoiceChip/ChoiceChip.test.js index f70d82a19..c63998e16 100644 --- a/apps/civicsignalblog/src/components/ChoiceChip/ChoiceChip.test.js +++ b/apps/civicsignalblog/src/components/ChoiceChip/ChoiceChip.test.js @@ -5,7 +5,6 @@ import ChoiceChip from "./ChoiceChip"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/ChoiceChipGroup/ChoiceChipGroup.test.js b/apps/civicsignalblog/src/components/ChoiceChipGroup/ChoiceChipGroup.test.js index d61adb39e..4cddb9b49 100644 --- a/apps/civicsignalblog/src/components/ChoiceChipGroup/ChoiceChipGroup.test.js +++ b/apps/civicsignalblog/src/components/ChoiceChipGroup/ChoiceChipGroup.test.js @@ -5,7 +5,6 @@ import ChoiceChipGroup from "./ChoiceChipGroup"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/ConnectBar/ConnectBar.test.js b/apps/civicsignalblog/src/components/ConnectBar/ConnectBar.test.js index 44b63bba1..3cdf47ee5 100644 --- a/apps/civicsignalblog/src/components/ConnectBar/ConnectBar.test.js +++ b/apps/civicsignalblog/src/components/ConnectBar/ConnectBar.test.js @@ -5,7 +5,6 @@ import ConnectBar from "./ConnectBar"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/CustomPageHeader/CustomPageHeader.test.js b/apps/civicsignalblog/src/components/CustomPageHeader/CustomPageHeader.test.js index 7564e35d9..e73dd148d 100644 --- a/apps/civicsignalblog/src/components/CustomPageHeader/CustomPageHeader.test.js +++ b/apps/civicsignalblog/src/components/CustomPageHeader/CustomPageHeader.test.js @@ -5,7 +5,6 @@ import CustomPageHeader from "./CustomPageHeader"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/DesktopNavBar/DesktopNavBar.test.js b/apps/civicsignalblog/src/components/DesktopNavBar/DesktopNavBar.test.js index 43ceb7768..a875e7003 100644 --- a/apps/civicsignalblog/src/components/DesktopNavBar/DesktopNavBar.test.js +++ b/apps/civicsignalblog/src/components/DesktopNavBar/DesktopNavBar.test.js @@ -5,7 +5,6 @@ import DesktopNavigation from "."; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/FeaturedArticle/FeaturedArticle.js b/apps/civicsignalblog/src/components/FeaturedArticle/FeaturedArticle.js index 92136901f..1677a908e 100644 --- a/apps/civicsignalblog/src/components/FeaturedArticle/FeaturedArticle.js +++ b/apps/civicsignalblog/src/components/FeaturedArticle/FeaturedArticle.js @@ -1,4 +1,3 @@ -/* eslint-disable camelcase */ import { Link } from "@commons-ui/next"; import { Button, CardActionArea, Grid, Typography } from "@mui/material"; import React from "react"; diff --git a/apps/civicsignalblog/src/components/FeaturedArticle/FeaturedArticle.test.js b/apps/civicsignalblog/src/components/FeaturedArticle/FeaturedArticle.test.js index d92e16498..79f9fee71 100644 --- a/apps/civicsignalblog/src/components/FeaturedArticle/FeaturedArticle.test.js +++ b/apps/civicsignalblog/src/components/FeaturedArticle/FeaturedArticle.test.js @@ -5,7 +5,6 @@ import FeaturedArticle from "./FeaturedArticle"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/FilterBar/FilterBar.test.js b/apps/civicsignalblog/src/components/FilterBar/FilterBar.test.js index 4c76ef1ed..a215fe3e1 100644 --- a/apps/civicsignalblog/src/components/FilterBar/FilterBar.test.js +++ b/apps/civicsignalblog/src/components/FilterBar/FilterBar.test.js @@ -5,7 +5,6 @@ import FilterBar from "./FilterBar"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/Footer/Footer.test.js b/apps/civicsignalblog/src/components/Footer/Footer.test.js index 901865ac0..b28d16cb2 100644 --- a/apps/civicsignalblog/src/components/Footer/Footer.test.js +++ b/apps/civicsignalblog/src/components/Footer/Footer.test.js @@ -5,7 +5,6 @@ import Footer from "./Footer"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/FooterNavList/index.test.js b/apps/civicsignalblog/src/components/FooterNavList/index.test.js index 37c69302b..d8cedd517 100644 --- a/apps/civicsignalblog/src/components/FooterNavList/index.test.js +++ b/apps/civicsignalblog/src/components/FooterNavList/index.test.js @@ -5,7 +5,6 @@ import FooterNavList from "."; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/LineClampedRichTypography/LineClampedRichTypography.test.js b/apps/civicsignalblog/src/components/LineClampedRichTypography/LineClampedRichTypography.test.js index 87b93c86e..d72389790 100644 --- a/apps/civicsignalblog/src/components/LineClampedRichTypography/LineClampedRichTypography.test.js +++ b/apps/civicsignalblog/src/components/LineClampedRichTypography/LineClampedRichTypography.test.js @@ -5,7 +5,6 @@ import LineClampedRichTypography from "./LineClampedRichTypography"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/LongForm/LongForm.test.js b/apps/civicsignalblog/src/components/LongForm/LongForm.test.js index eb9737d9c..5a0516172 100644 --- a/apps/civicsignalblog/src/components/LongForm/LongForm.test.js +++ b/apps/civicsignalblog/src/components/LongForm/LongForm.test.js @@ -5,7 +5,6 @@ import LongForm from "."; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/LongFormExternalEmbed/LongFormExternalEmbed.test.js b/apps/civicsignalblog/src/components/LongFormExternalEmbed/LongFormExternalEmbed.test.js index 0447f0c63..c13b7e1ec 100644 --- a/apps/civicsignalblog/src/components/LongFormExternalEmbed/LongFormExternalEmbed.test.js +++ b/apps/civicsignalblog/src/components/LongFormExternalEmbed/LongFormExternalEmbed.test.js @@ -5,7 +5,6 @@ import LongFormExternalEmbed from "./LongFormExternalEmbed"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/LongFormMedia/LongFormMedia.test.js b/apps/civicsignalblog/src/components/LongFormMedia/LongFormMedia.test.js index 3dbbd72c6..120979257 100644 --- a/apps/civicsignalblog/src/components/LongFormMedia/LongFormMedia.test.js +++ b/apps/civicsignalblog/src/components/LongFormMedia/LongFormMedia.test.js @@ -5,7 +5,6 @@ import LongFormMedia from "./LongFormMedia"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/LongFormRichText/LongFormRichText.test.js b/apps/civicsignalblog/src/components/LongFormRichText/LongFormRichText.test.js index 5cc608852..94cfe2284 100644 --- a/apps/civicsignalblog/src/components/LongFormRichText/LongFormRichText.test.js +++ b/apps/civicsignalblog/src/components/LongFormRichText/LongFormRichText.test.js @@ -5,7 +5,6 @@ import LongFormRichText from "./LongFormRichText"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/MobileNavBar/MobileNavBar.test.js b/apps/civicsignalblog/src/components/MobileNavBar/MobileNavBar.test.js index 18202e10d..57726285e 100644 --- a/apps/civicsignalblog/src/components/MobileNavBar/MobileNavBar.test.js +++ b/apps/civicsignalblog/src/components/MobileNavBar/MobileNavBar.test.js @@ -5,7 +5,6 @@ import MobileNavigation from "."; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/NavBar/NavBar.test.js b/apps/civicsignalblog/src/components/NavBar/NavBar.test.js index 56a4d8d64..847031172 100644 --- a/apps/civicsignalblog/src/components/NavBar/NavBar.test.js +++ b/apps/civicsignalblog/src/components/NavBar/NavBar.test.js @@ -5,7 +5,6 @@ import NavBar from "."; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/NavBarNavList/NavBarNavList.test.js b/apps/civicsignalblog/src/components/NavBarNavList/NavBarNavList.test.js index bb164acfc..2ea730466 100644 --- a/apps/civicsignalblog/src/components/NavBarNavList/NavBarNavList.test.js +++ b/apps/civicsignalblog/src/components/NavBarNavList/NavBarNavList.test.js @@ -5,7 +5,6 @@ import NavBarNavList from "."; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/NewsletterSubscription/NewsletterSubscription.test.js b/apps/civicsignalblog/src/components/NewsletterSubscription/NewsletterSubscription.test.js index 5eae60b47..0bea4178c 100644 --- a/apps/civicsignalblog/src/components/NewsletterSubscription/NewsletterSubscription.test.js +++ b/apps/civicsignalblog/src/components/NewsletterSubscription/NewsletterSubscription.test.js @@ -5,7 +5,6 @@ import NewsletterSubscription from "./NewsletterSubscription"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/NextImageButton/NextImageButton.test.js b/apps/civicsignalblog/src/components/NextImageButton/NextImageButton.test.js index 30b6304e4..3bb18d7d1 100644 --- a/apps/civicsignalblog/src/components/NextImageButton/NextImageButton.test.js +++ b/apps/civicsignalblog/src/components/NextImageButton/NextImageButton.test.js @@ -5,7 +5,6 @@ import NextImageButton from "./NextImageButton"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/NextPreviousPagination/NextPreviousPagination.test.js b/apps/civicsignalblog/src/components/NextPreviousPagination/NextPreviousPagination.test.js index ead7644e8..ab473e434 100644 --- a/apps/civicsignalblog/src/components/NextPreviousPagination/NextPreviousPagination.test.js +++ b/apps/civicsignalblog/src/components/NextPreviousPagination/NextPreviousPagination.test.js @@ -5,7 +5,6 @@ import NextPreviousPagination from "./NextPreviousPagination"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/NextPreviousPagination/PaginationButton.test.js b/apps/civicsignalblog/src/components/NextPreviousPagination/PaginationButton.test.js index 5c6ba97d2..e7cb967a9 100644 --- a/apps/civicsignalblog/src/components/NextPreviousPagination/PaginationButton.test.js +++ b/apps/civicsignalblog/src/components/NextPreviousPagination/PaginationButton.test.js @@ -5,7 +5,6 @@ import PaginationButton from "./PaginationButton"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/Page/Page.test.js b/apps/civicsignalblog/src/components/Page/Page.test.js index 48985b4cf..b285e9fc7 100644 --- a/apps/civicsignalblog/src/components/Page/Page.test.js +++ b/apps/civicsignalblog/src/components/Page/Page.test.js @@ -5,7 +5,6 @@ import Page from "./Page"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/PageHeader/PageHeader.test.js b/apps/civicsignalblog/src/components/PageHeader/PageHeader.test.js index e447ac4fd..b10a0aa8e 100644 --- a/apps/civicsignalblog/src/components/PageHeader/PageHeader.test.js +++ b/apps/civicsignalblog/src/components/PageHeader/PageHeader.test.js @@ -5,7 +5,6 @@ import PageHeader from "./PageHeader"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/RelatedStories/RelatedStories.test.js b/apps/civicsignalblog/src/components/RelatedStories/RelatedStories.test.js index 07ad1579b..3a80c3373 100644 --- a/apps/civicsignalblog/src/components/RelatedStories/RelatedStories.test.js +++ b/apps/civicsignalblog/src/components/RelatedStories/RelatedStories.test.js @@ -5,7 +5,6 @@ import RelatedStories from "./RelatedStories"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/SearchInput/SearchInput.test.js b/apps/civicsignalblog/src/components/SearchInput/SearchInput.test.js index bef72fe48..67c0d4c8d 100644 --- a/apps/civicsignalblog/src/components/SearchInput/SearchInput.test.js +++ b/apps/civicsignalblog/src/components/SearchInput/SearchInput.test.js @@ -5,7 +5,6 @@ import SearchInput from "./SearchInput"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/SectionDivider/SectionDivider.test.js b/apps/civicsignalblog/src/components/SectionDivider/SectionDivider.test.js index aa72008f7..fa2aec40b 100644 --- a/apps/civicsignalblog/src/components/SectionDivider/SectionDivider.test.js +++ b/apps/civicsignalblog/src/components/SectionDivider/SectionDivider.test.js @@ -5,7 +5,6 @@ import SectionDivider from "./SectionDivider"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/civicsignalblog/src/components/ShareButton/ShareButton.test.js b/apps/civicsignalblog/src/components/ShareButton/ShareButton.test.js index 995e987e8..a2f37c826 100644 --- a/apps/civicsignalblog/src/components/ShareButton/ShareButton.test.js +++ b/apps/civicsignalblog/src/components/ShareButton/ShareButton.test.js @@ -9,7 +9,6 @@ import { import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/ShareThisPage/ShareThisPage.test.js b/apps/civicsignalblog/src/components/ShareThisPage/ShareThisPage.test.js index cb6ad2003..353f95093 100644 --- a/apps/civicsignalblog/src/components/ShareThisPage/ShareThisPage.test.js +++ b/apps/civicsignalblog/src/components/ShareThisPage/ShareThisPage.test.js @@ -5,7 +5,6 @@ import ShareThisPage from "./ShareThisPage"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/civicsignalblog/src/components/SocialMediaBar/SocialMediaBar.test.js b/apps/civicsignalblog/src/components/SocialMediaBar/SocialMediaBar.test.js index f7106b1ad..350899f68 100644 --- a/apps/civicsignalblog/src/components/SocialMediaBar/SocialMediaBar.test.js +++ b/apps/civicsignalblog/src/components/SocialMediaBar/SocialMediaBar.test.js @@ -5,7 +5,6 @@ import SocialMediaBar from "./SocialMediaBar"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/SocialMediaButton/SocialMediaButton.test.js b/apps/civicsignalblog/src/components/SocialMediaButton/SocialMediaButton.test.js index c3d63d235..f107efa61 100644 --- a/apps/civicsignalblog/src/components/SocialMediaButton/SocialMediaButton.test.js +++ b/apps/civicsignalblog/src/components/SocialMediaButton/SocialMediaButton.test.js @@ -5,7 +5,6 @@ import SocialMediaButton from "./SocialMediaButton"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/SocialMediaButtonGroup/SocialMediaButtonGroup.test.js b/apps/civicsignalblog/src/components/SocialMediaButtonGroup/SocialMediaButtonGroup.test.js index 5e8e50a69..4eea29ff3 100644 --- a/apps/civicsignalblog/src/components/SocialMediaButtonGroup/SocialMediaButtonGroup.test.js +++ b/apps/civicsignalblog/src/components/SocialMediaButtonGroup/SocialMediaButtonGroup.test.js @@ -5,7 +5,6 @@ import SocialMediaButtonGroup from "./SocialMediaButtonGroup"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/civicsignalblog/src/components/TooltipButton/TooltipButton.test.js b/apps/civicsignalblog/src/components/TooltipButton/TooltipButton.test.js index 371381079..bfb0485b5 100644 --- a/apps/civicsignalblog/src/components/TooltipButton/TooltipButton.test.js +++ b/apps/civicsignalblog/src/components/TooltipButton/TooltipButton.test.js @@ -5,7 +5,6 @@ import TooltipButton from "./TooltipButton"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/civicsignalblog/src/components/TwoToneBackground/TwoToneBackground.test.js b/apps/civicsignalblog/src/components/TwoToneBackground/TwoToneBackground.test.js index ea59df7d6..356c2f9af 100644 --- a/apps/civicsignalblog/src/components/TwoToneBackground/TwoToneBackground.test.js +++ b/apps/civicsignalblog/src/components/TwoToneBackground/TwoToneBackground.test.js @@ -5,7 +5,6 @@ import TwoToneBackground from "./TwoToneBackground"; import theme from "@/civicsignalblog/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/civicsignalblog/src/payload/components/allowedAppSelect/index.tsx b/apps/civicsignalblog/src/payload/components/allowedAppSelect/index.js similarity index 100% rename from apps/civicsignalblog/src/payload/components/allowedAppSelect/index.tsx rename to apps/civicsignalblog/src/payload/components/allowedAppSelect/index.js diff --git a/apps/civicsignalblog/src/payload/fields/customSelect/currentApp.js b/apps/civicsignalblog/src/payload/fields/customSelect/currentApp.js index 7f2a68d28..e639217f9 100644 --- a/apps/civicsignalblog/src/payload/fields/customSelect/currentApp.js +++ b/apps/civicsignalblog/src/payload/fields/customSelect/currentApp.js @@ -1,4 +1,4 @@ -import CustomSelectComponent from "#civicsignalblog/payload/components/allowedAppSelect/index"; +import CustomSelectComponent from "#civicsignalblog/payload/components/allowedAppSelect"; const CurrentAppSelectField = { name: "currentApp", diff --git a/apps/civicsignalblog/src/payload/fields/customSelect/defaultApp.js b/apps/civicsignalblog/src/payload/fields/customSelect/defaultApp.js index 2ba2d669e..269822fef 100644 --- a/apps/civicsignalblog/src/payload/fields/customSelect/defaultApp.js +++ b/apps/civicsignalblog/src/payload/fields/customSelect/defaultApp.js @@ -1,4 +1,4 @@ -import CustomSelectComponent from "#civicsignalblog/payload/components/allowedAppSelect/index"; +import CustomSelectComponent from "#civicsignalblog/payload/components/allowedAppSelect"; const DefaultAppSelectField = { name: "defaultApp", diff --git a/apps/civicsignalblog/tsconfig.json b/apps/civicsignalblog/tsconfig.json index 7f5e2fa58..d76ccc173 100644 --- a/apps/civicsignalblog/tsconfig.json +++ b/apps/civicsignalblog/tsconfig.json @@ -20,7 +20,8 @@ "@/commons-ui/next/*": ["../../packages/commons-ui-next/src/*"], "@/commons-ui/payload/*": ["../../packages/commons-ui-payload/src/*"], "#civicsignalblog*": ["./src/*"] - } + }, + "target": "ES2017" }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "exclude": ["build", "dist", "node_modules"] diff --git a/apps/climatemappedafrica/.eslintignore b/apps/climatemappedafrica/.eslintignore deleted file mode 100644 index 19d6cb9ac..000000000 --- a/apps/climatemappedafrica/.eslintignore +++ /dev/null @@ -1,36 +0,0 @@ -# dependencies -node_modules -.pnp -.pnp.js -.pnpm-debug.log - -# typescript -dist/ - -# testing -coverage - -# next.js -.next/ -out/ - -# payload -build/ - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Vercel -.vercel -.now - -# turbo -.turbo -test-results/ -playwright-report/ diff --git a/apps/climatemappedafrica/.eslintrc.js b/apps/climatemappedafrica/.eslintrc.js deleted file mode 100644 index 468a5ff74..000000000 --- a/apps/climatemappedafrica/.eslintrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - root: true, - extends: ["eslint-config-commons-ui/next"], - settings: { - "import/resolver": { - webpack: { - config: "./eslint.webpack.config.js", - }, - }, - }, -}; diff --git a/apps/climatemappedafrica/package.json b/apps/climatemappedafrica/package.json index ffa03a767..df43ef028 100644 --- a/apps/climatemappedafrica/package.json +++ b/apps/climatemappedafrica/package.json @@ -27,7 +27,7 @@ "start": "PAYLOAD_CONFIG_PATH=${PAYLOAD_CONFIG_PATH:-dist/payload.config.js} NODE_ENV=${NODE_ENV:-production} node dist/server.js", "dev": "NODE_OPTIONS='--inspect' TS_NODE_PROJECT=tsconfig.server.json tsx server.ts", "lint-check": "TIMING=1 eslint './'", - "lint": "TIMING=1 eslint --fix './'", + "lint": "TIMING=1 eslint --flag unstable_config_lookup_from_file --fix './'", "jest": "jest", "playwright": "npx playwright test", "clean": "rm -rf .next .turbo build dist node_modules" diff --git a/apps/climatemappedafrica/playwright.config.js b/apps/climatemappedafrica/playwright.config.js index 317c83d64..ce0b9a6e1 100644 --- a/apps/climatemappedafrica/playwright.config.js +++ b/apps/climatemappedafrica/playwright.config.js @@ -1,2 +1 @@ -/* eslint-disable import/no-extraneous-dependencies */ module.exports = require("playwright-config-commons-ui"); diff --git a/apps/climatemappedafrica/src/components/AboutTeam/AboutTeam.test.js b/apps/climatemappedafrica/src/components/AboutTeam/AboutTeam.test.js index 256d0850e..91581f7dd 100644 --- a/apps/climatemappedafrica/src/components/AboutTeam/AboutTeam.test.js +++ b/apps/climatemappedafrica/src/components/AboutTeam/AboutTeam.test.js @@ -5,7 +5,6 @@ import AboutTeam from "."; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/climatemappedafrica/src/components/Card/Card.test.js b/apps/climatemappedafrica/src/components/Card/Card.test.js index 0ce6f5360..aedc6782d 100644 --- a/apps/climatemappedafrica/src/components/Card/Card.test.js +++ b/apps/climatemappedafrica/src/components/Card/Card.test.js @@ -5,7 +5,6 @@ import Card from "."; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/climatemappedafrica/src/components/Carousel/Carousel.test.js b/apps/climatemappedafrica/src/components/Carousel/Carousel.test.js index 95a811214..4c6e0dc04 100644 --- a/apps/climatemappedafrica/src/components/Carousel/Carousel.test.js +++ b/apps/climatemappedafrica/src/components/Carousel/Carousel.test.js @@ -5,7 +5,6 @@ import Carousel from "."; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/climatemappedafrica/src/components/DataIndicators/DataIndicators.test.js b/apps/climatemappedafrica/src/components/DataIndicators/DataIndicators.test.js index 7af4abdd6..62c531f16 100644 --- a/apps/climatemappedafrica/src/components/DataIndicators/DataIndicators.test.js +++ b/apps/climatemappedafrica/src/components/DataIndicators/DataIndicators.test.js @@ -5,7 +5,6 @@ import DataIndicators from "./DataIndicators"; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/climatemappedafrica/src/components/DropdownSearch/DropdownSearch.test.js b/apps/climatemappedafrica/src/components/DropdownSearch/DropdownSearch.test.js index c50350da4..d779a661e 100644 --- a/apps/climatemappedafrica/src/components/DropdownSearch/DropdownSearch.test.js +++ b/apps/climatemappedafrica/src/components/DropdownSearch/DropdownSearch.test.js @@ -5,7 +5,6 @@ import DropdownSearch from "./DownloadSearch"; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/climatemappedafrica/src/components/Footer/index.stories.js b/apps/climatemappedafrica/src/components/Footer/index.stories.js index 9c46cbae2..29d3223a2 100644 --- a/apps/climatemappedafrica/src/components/Footer/index.stories.js +++ b/apps/climatemappedafrica/src/components/Footer/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import React from "react"; import Footer from "."; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Chart/index.stories.js b/apps/climatemappedafrica/src/components/HURUmap/Chart/index.stories.js index 68475d79d..786da77ef 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Chart/index.stories.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Chart/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import React from "react"; import Chart from "@/climatemappedafrica/components/HURUmap/Chart"; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/MobilePanel.js b/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/MobilePanel.js index 8d07887ba..889a73430 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/MobilePanel.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/MobilePanel.js @@ -13,7 +13,6 @@ import Tabs from "@/climatemappedafrica/components/Tabs"; import { hurumapArgs } from "@/climatemappedafrica/config"; // being last is necessary for style override to work -// eslint-disable-next-line import/order function MobilePanel({ activeType, scrollToTopLabel, sx, ...props }) { const { onSelectLocation, primaryProfile, dataNotAvailable } = props; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Panel/Panel.test.js b/apps/climatemappedafrica/src/components/HURUmap/Panel/Panel.test.js index a20980e90..3c3ba6def 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Panel/Panel.test.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Panel/Panel.test.js @@ -5,7 +5,6 @@ import Panel from "."; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/climatemappedafrica/src/components/HURUmap/PanelButtonGroup/PanelButtonGroup.test.js b/apps/climatemappedafrica/src/components/HURUmap/PanelButtonGroup/PanelButtonGroup.test.js index a115263e5..0ff0b1dda 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/PanelButtonGroup/PanelButtonGroup.test.js +++ b/apps/climatemappedafrica/src/components/HURUmap/PanelButtonGroup/PanelButtonGroup.test.js @@ -5,7 +5,6 @@ import PanelButtonGroup from "."; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/climatemappedafrica/src/components/HURUmap/TreeView/TreeView.test.js b/apps/climatemappedafrica/src/components/HURUmap/TreeView/TreeView.test.js index 0a73dab2a..d000cd59f 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/TreeView/TreeView.test.js +++ b/apps/climatemappedafrica/src/components/HURUmap/TreeView/TreeView.test.js @@ -5,7 +5,6 @@ import TreeView from "."; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/climatemappedafrica/src/components/Header/Header.test.js b/apps/climatemappedafrica/src/components/Header/Header.test.js index e7211e085..cecb21855 100644 --- a/apps/climatemappedafrica/src/components/Header/Header.test.js +++ b/apps/climatemappedafrica/src/components/Header/Header.test.js @@ -5,7 +5,6 @@ import Header from "."; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/climatemappedafrica/src/components/Hero/Hero.test.js b/apps/climatemappedafrica/src/components/Hero/Hero.test.js index 3f40c1c87..83da46044 100644 --- a/apps/climatemappedafrica/src/components/Hero/Hero.test.js +++ b/apps/climatemappedafrica/src/components/Hero/Hero.test.js @@ -5,7 +5,6 @@ import Hero from "."; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/climatemappedafrica/src/components/Image/Image.test.js b/apps/climatemappedafrica/src/components/Image/Image.test.js index ba63e3076..8157d0c13 100644 --- a/apps/climatemappedafrica/src/components/Image/Image.test.js +++ b/apps/climatemappedafrica/src/components/Image/Image.test.js @@ -5,7 +5,6 @@ import Image from "."; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/climatemappedafrica/src/components/Link/index.js b/apps/climatemappedafrica/src/components/Link/index.js index 2d57586e2..fa97adde1 100644 --- a/apps/climatemappedafrica/src/components/Link/index.js +++ b/apps/climatemappedafrica/src/components/Link/index.js @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/anchor-has-content */ import { A } from "@commons-ui/legacy"; import { Link as MuiLink } from "@mui/material"; import clsx from "clsx"; diff --git a/apps/climatemappedafrica/src/components/PageHero/PageHero.test.js b/apps/climatemappedafrica/src/components/PageHero/PageHero.test.js index 85994fd80..855e10725 100644 --- a/apps/climatemappedafrica/src/components/PageHero/PageHero.test.js +++ b/apps/climatemappedafrica/src/components/PageHero/PageHero.test.js @@ -5,7 +5,6 @@ import PageHero from "."; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/climatemappedafrica/src/components/RichHeader/RichHeader.test.js b/apps/climatemappedafrica/src/components/RichHeader/RichHeader.test.js index 634a8acdb..f7d76a161 100644 --- a/apps/climatemappedafrica/src/components/RichHeader/RichHeader.test.js +++ b/apps/climatemappedafrica/src/components/RichHeader/RichHeader.test.js @@ -5,7 +5,6 @@ import RichHeader from "."; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/climatemappedafrica/src/components/Summary/Summary.test.js b/apps/climatemappedafrica/src/components/Summary/Summary.test.js index b92117cfe..c8d51e28b 100644 --- a/apps/climatemappedafrica/src/components/Summary/Summary.test.js +++ b/apps/climatemappedafrica/src/components/Summary/Summary.test.js @@ -5,7 +5,6 @@ import Summary from "."; import theme from "@/climatemappedafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/climatemappedafrica/src/next-seo.config.js b/apps/climatemappedafrica/src/next-seo.config.js index 32d5eb5e0..2270b401e 100644 --- a/apps/climatemappedafrica/src/next-seo.config.js +++ b/apps/climatemappedafrica/src/next-seo.config.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import site from "@/climatemappedafrica/utils/site"; export default { diff --git a/apps/codeforafrica/.eslintignore b/apps/codeforafrica/.eslintignore deleted file mode 100644 index 19d6cb9ac..000000000 --- a/apps/codeforafrica/.eslintignore +++ /dev/null @@ -1,36 +0,0 @@ -# dependencies -node_modules -.pnp -.pnp.js -.pnpm-debug.log - -# typescript -dist/ - -# testing -coverage - -# next.js -.next/ -out/ - -# payload -build/ - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Vercel -.vercel -.now - -# turbo -.turbo -test-results/ -playwright-report/ diff --git a/apps/codeforafrica/.eslintrc.js b/apps/codeforafrica/.eslintrc.js deleted file mode 100644 index 468a5ff74..000000000 --- a/apps/codeforafrica/.eslintrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - root: true, - extends: ["eslint-config-commons-ui/next"], - settings: { - "import/resolver": { - webpack: { - config: "./eslint.webpack.config.js", - }, - }, - }, -}; diff --git a/apps/codeforafrica/package.json b/apps/codeforafrica/package.json index 6372d764e..e94662092 100644 --- a/apps/codeforafrica/package.json +++ b/apps/codeforafrica/package.json @@ -27,7 +27,7 @@ "start": "PAYLOAD_CONFIG_PATH=${PAYLOAD_CONFIG_PATH:-dist/payload.config.js} NODE_ENV=${NODE_ENV:-production} node dist/server.js", "dev": "NODE_OPTIONS='--inspect' TS_NODE_PROJECT=tsconfig.server.json tsx server.ts", "lint-check": "TIMING=1 eslint './'", - "lint": "TIMING=1 eslint --fix './'", + "lint": "TIMING=1 eslint --flag unstable_config_lookup_from_file --fix './'", "jest": "jest", "playwright": "npx playwright test", "clean": "rm -rf .next .turbo node_modules" diff --git a/apps/codeforafrica/playwright.config.js b/apps/codeforafrica/playwright.config.js index f46c5bd3b..3b722dce9 100644 --- a/apps/codeforafrica/playwright.config.js +++ b/apps/codeforafrica/playwright.config.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ const defaultConfig = require("playwright-config-commons-ui"); const { use, webServer } = defaultConfig; diff --git a/apps/codeforafrica/src/components/AboutChildPageHeader/AboutChildPageHeader.test.js b/apps/codeforafrica/src/components/AboutChildPageHeader/AboutChildPageHeader.test.js index 7990a2583..823a93a50 100644 --- a/apps/codeforafrica/src/components/AboutChildPageHeader/AboutChildPageHeader.test.js +++ b/apps/codeforafrica/src/components/AboutChildPageHeader/AboutChildPageHeader.test.js @@ -5,7 +5,6 @@ import AboutChildPageHeader from "./AboutChildPageHeader"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/AboutPageEntity/AboutPageEntity.test.js b/apps/codeforafrica/src/components/AboutPageEntity/AboutPageEntity.test.js index 76732bd3c..5be68540f 100644 --- a/apps/codeforafrica/src/components/AboutPageEntity/AboutPageEntity.test.js +++ b/apps/codeforafrica/src/components/AboutPageEntity/AboutPageEntity.test.js @@ -5,7 +5,6 @@ import AboutPageEntity from "./AboutPageEntity"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/AccoladeBadge/AccoladeBadge.test.js b/apps/codeforafrica/src/components/AccoladeBadge/AccoladeBadge.test.js index ffc96c05d..af7b64f46 100644 --- a/apps/codeforafrica/src/components/AccoladeBadge/AccoladeBadge.test.js +++ b/apps/codeforafrica/src/components/AccoladeBadge/AccoladeBadge.test.js @@ -5,7 +5,6 @@ import AccoladeBadge from "./AccoladeBadge"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/AccoladeBadgeList/AccoladeBadge.test.js b/apps/codeforafrica/src/components/AccoladeBadgeList/AccoladeBadge.test.js index 6211e22ac..f9d0f6036 100644 --- a/apps/codeforafrica/src/components/AccoladeBadgeList/AccoladeBadge.test.js +++ b/apps/codeforafrica/src/components/AccoladeBadgeList/AccoladeBadge.test.js @@ -5,7 +5,6 @@ import AccoladeBadgeList from "./AccoladeBadgeList"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/AddressCard/AddressCard.test.js b/apps/codeforafrica/src/components/AddressCard/AddressCard.test.js index 35dd1ed62..675456165 100644 --- a/apps/codeforafrica/src/components/AddressCard/AddressCard.test.js +++ b/apps/codeforafrica/src/components/AddressCard/AddressCard.test.js @@ -5,7 +5,6 @@ import AddressCard from "./AddressCard"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ArticleCard/ArticleCard.test.js b/apps/codeforafrica/src/components/ArticleCard/ArticleCard.test.js index 65820dd1c..f3ee6b778 100644 --- a/apps/codeforafrica/src/components/ArticleCard/ArticleCard.test.js +++ b/apps/codeforafrica/src/components/ArticleCard/ArticleCard.test.js @@ -5,7 +5,6 @@ import ArticleCard from "./ArticleCard"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ArticleCardContent/ArticleCardContent.test.js b/apps/codeforafrica/src/components/ArticleCardContent/ArticleCardContent.test.js index 159100bdd..d986b55ea 100644 --- a/apps/codeforafrica/src/components/ArticleCardContent/ArticleCardContent.test.js +++ b/apps/codeforafrica/src/components/ArticleCardContent/ArticleCardContent.test.js @@ -5,7 +5,6 @@ import ArticleCardContent from "./ArticleCardContent"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ArticleCardList/ArticleCardList.test.js b/apps/codeforafrica/src/components/ArticleCardList/ArticleCardList.test.js index 5c9d8e74d..c22693ccc 100644 --- a/apps/codeforafrica/src/components/ArticleCardList/ArticleCardList.test.js +++ b/apps/codeforafrica/src/components/ArticleCardList/ArticleCardList.test.js @@ -5,7 +5,6 @@ import ArticleCardList from "./ArticleCardList"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ArticleCardMedia/ArticleCardMedia.test.js b/apps/codeforafrica/src/components/ArticleCardMedia/ArticleCardMedia.test.js index d4f154d2b..d40cb5fd3 100644 --- a/apps/codeforafrica/src/components/ArticleCardMedia/ArticleCardMedia.test.js +++ b/apps/codeforafrica/src/components/ArticleCardMedia/ArticleCardMedia.test.js @@ -5,7 +5,6 @@ import ArticleCardMedia from "./ArticleCardMedia"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ArticleGrid/ArticleGrid.test.js b/apps/codeforafrica/src/components/ArticleGrid/ArticleGrid.test.js index 5ba5f755d..0135de258 100644 --- a/apps/codeforafrica/src/components/ArticleGrid/ArticleGrid.test.js +++ b/apps/codeforafrica/src/components/ArticleGrid/ArticleGrid.test.js @@ -5,7 +5,6 @@ import ArticleGrid from "./ArticleGrid"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ArticleHeader/ArticleHeader.test.js b/apps/codeforafrica/src/components/ArticleHeader/ArticleHeader.test.js index ddcdfd1eb..2b83725ad 100644 --- a/apps/codeforafrica/src/components/ArticleHeader/ArticleHeader.test.js +++ b/apps/codeforafrica/src/components/ArticleHeader/ArticleHeader.test.js @@ -5,7 +5,6 @@ import ArticleHeader from "./ArticleHeader"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ArticlePage/ArticlePage.js b/apps/codeforafrica/src/components/ArticlePage/ArticlePage.js index 1a7ef87a0..a0c834b02 100644 --- a/apps/codeforafrica/src/components/ArticlePage/ArticlePage.js +++ b/apps/codeforafrica/src/components/ArticlePage/ArticlePage.js @@ -1,4 +1,3 @@ -/* eslint-disable camelcase */ import { Section } from "@commons-ui/core"; import { Figure, Link } from "@commons-ui/next"; import { Box } from "@mui/material"; diff --git a/apps/codeforafrica/src/components/ArticlePage/ArticlePage.test.js b/apps/codeforafrica/src/components/ArticlePage/ArticlePage.test.js index 66fb1176e..29d003cd1 100644 --- a/apps/codeforafrica/src/components/ArticlePage/ArticlePage.test.js +++ b/apps/codeforafrica/src/components/ArticlePage/ArticlePage.test.js @@ -5,7 +5,6 @@ import ArticlePage from "./ArticlePage"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/Articles/Articles.test.js b/apps/codeforafrica/src/components/Articles/Articles.test.js index 7c1170bb4..4bf4082af 100644 --- a/apps/codeforafrica/src/components/Articles/Articles.test.js +++ b/apps/codeforafrica/src/components/Articles/Articles.test.js @@ -5,7 +5,6 @@ import Articles from "./Articles"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/Author/Author.test.js b/apps/codeforafrica/src/components/Author/Author.test.js index 042753def..5e714aa9d 100644 --- a/apps/codeforafrica/src/components/Author/Author.test.js +++ b/apps/codeforafrica/src/components/Author/Author.test.js @@ -5,7 +5,6 @@ import Author from "./Author"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/Breadcrumbs/Breadcrumbs.test.js b/apps/codeforafrica/src/components/Breadcrumbs/Breadcrumbs.test.js index 3861cf76f..8525859f7 100644 --- a/apps/codeforafrica/src/components/Breadcrumbs/Breadcrumbs.test.js +++ b/apps/codeforafrica/src/components/Breadcrumbs/Breadcrumbs.test.js @@ -5,7 +5,6 @@ import Breadcrumbs from "./Breadcrumbs"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/CMSContent/CMSContent.test.js b/apps/codeforafrica/src/components/CMSContent/CMSContent.test.js index 795bffa99..15920ab92 100644 --- a/apps/codeforafrica/src/components/CMSContent/CMSContent.test.js +++ b/apps/codeforafrica/src/components/CMSContent/CMSContent.test.js @@ -5,7 +5,6 @@ import CMSContent from "./CMSContent"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/ChoiceChip/ChoiceChip.test.js b/apps/codeforafrica/src/components/ChoiceChip/ChoiceChip.test.js index 60503956e..9f704f347 100644 --- a/apps/codeforafrica/src/components/ChoiceChip/ChoiceChip.test.js +++ b/apps/codeforafrica/src/components/ChoiceChip/ChoiceChip.test.js @@ -5,7 +5,6 @@ import ChoiceChip from "./ChoiceChip"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ChoiceChipGroup/ChoiceChipGroup.test.js b/apps/codeforafrica/src/components/ChoiceChipGroup/ChoiceChipGroup.test.js index 300f3fcce..16f995820 100644 --- a/apps/codeforafrica/src/components/ChoiceChipGroup/ChoiceChipGroup.test.js +++ b/apps/codeforafrica/src/components/ChoiceChipGroup/ChoiceChipGroup.test.js @@ -5,7 +5,6 @@ import ChoiceChipGroup from "./ChoiceChipGroup"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ConnectBar/ConnectBar.test.js b/apps/codeforafrica/src/components/ConnectBar/ConnectBar.test.js index c82b3733c..a34b3ae23 100644 --- a/apps/codeforafrica/src/components/ConnectBar/ConnectBar.test.js +++ b/apps/codeforafrica/src/components/ConnectBar/ConnectBar.test.js @@ -5,7 +5,6 @@ import ConnectBar from "./ConnectBar"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/ContactForm/ContactForm.test.js b/apps/codeforafrica/src/components/ContactForm/ContactForm.test.js index e15d85adf..66feb3bd6 100644 --- a/apps/codeforafrica/src/components/ContactForm/ContactForm.test.js +++ b/apps/codeforafrica/src/components/ContactForm/ContactForm.test.js @@ -5,7 +5,6 @@ import ContactForm from "./ContactForm"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/CustomPageHeader/CustomPageHeader.test.js b/apps/codeforafrica/src/components/CustomPageHeader/CustomPageHeader.test.js index 66ff97a72..16f6a15e9 100644 --- a/apps/codeforafrica/src/components/CustomPageHeader/CustomPageHeader.test.js +++ b/apps/codeforafrica/src/components/CustomPageHeader/CustomPageHeader.test.js @@ -5,7 +5,6 @@ import CustomPageHeader from "./CustomPageHeader"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/DesktopNavBar/DesktopNavBar.test.js b/apps/codeforafrica/src/components/DesktopNavBar/DesktopNavBar.test.js index fe898452e..48ebe95b8 100644 --- a/apps/codeforafrica/src/components/DesktopNavBar/DesktopNavBar.test.js +++ b/apps/codeforafrica/src/components/DesktopNavBar/DesktopNavBar.test.js @@ -5,7 +5,6 @@ import DesktopNavigation from "."; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ErrorHero/ErrorHero.test.js b/apps/codeforafrica/src/components/ErrorHero/ErrorHero.test.js index 59d9eb847..379e45a62 100644 --- a/apps/codeforafrica/src/components/ErrorHero/ErrorHero.test.js +++ b/apps/codeforafrica/src/components/ErrorHero/ErrorHero.test.js @@ -5,7 +5,6 @@ import ErrorHero from "./ErrorHero"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ErrorPage/ErrorPage.test.js b/apps/codeforafrica/src/components/ErrorPage/ErrorPage.test.js index dbd95958c..b04596886 100644 --- a/apps/codeforafrica/src/components/ErrorPage/ErrorPage.test.js +++ b/apps/codeforafrica/src/components/ErrorPage/ErrorPage.test.js @@ -5,7 +5,6 @@ import ErrorPage from "./ErrorPage"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/FeaturedArticle/FeaturedArticle.js b/apps/codeforafrica/src/components/FeaturedArticle/FeaturedArticle.js index 64b0195f1..2430aea92 100644 --- a/apps/codeforafrica/src/components/FeaturedArticle/FeaturedArticle.js +++ b/apps/codeforafrica/src/components/FeaturedArticle/FeaturedArticle.js @@ -1,4 +1,3 @@ -/* eslint-disable camelcase */ import { Link } from "@commons-ui/next"; import { Button, CardActionArea, Grid, Typography } from "@mui/material"; import React from "react"; diff --git a/apps/codeforafrica/src/components/FeaturedArticle/FeaturedArticle.test.js b/apps/codeforafrica/src/components/FeaturedArticle/FeaturedArticle.test.js index abd1e9500..be35e8116 100644 --- a/apps/codeforafrica/src/components/FeaturedArticle/FeaturedArticle.test.js +++ b/apps/codeforafrica/src/components/FeaturedArticle/FeaturedArticle.test.js @@ -5,7 +5,6 @@ import FeaturedArticle from "./FeaturedArticle"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/FeaturedProjects/FeaturedProjects.test.js b/apps/codeforafrica/src/components/FeaturedProjects/FeaturedProjects.test.js index bc49f5d81..157c8f47d 100644 --- a/apps/codeforafrica/src/components/FeaturedProjects/FeaturedProjects.test.js +++ b/apps/codeforafrica/src/components/FeaturedProjects/FeaturedProjects.test.js @@ -5,7 +5,6 @@ import FeaturedProjects from "./FeaturedProjects"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { projects: [], diff --git a/apps/codeforafrica/src/components/FilterBar/FilterBar.test.js b/apps/codeforafrica/src/components/FilterBar/FilterBar.test.js index 5cddef8da..7bac8adfd 100644 --- a/apps/codeforafrica/src/components/FilterBar/FilterBar.test.js +++ b/apps/codeforafrica/src/components/FilterBar/FilterBar.test.js @@ -5,7 +5,6 @@ import FilterBar from "./FilterBar"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/Footer/Footer.test.js b/apps/codeforafrica/src/components/Footer/Footer.test.js index ae4c1bd41..2c3273475 100644 --- a/apps/codeforafrica/src/components/Footer/Footer.test.js +++ b/apps/codeforafrica/src/components/Footer/Footer.test.js @@ -5,7 +5,6 @@ import Footer from "./Footer"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/FooterNavList/index.test.js b/apps/codeforafrica/src/components/FooterNavList/index.test.js index d036cafe9..46067a08d 100644 --- a/apps/codeforafrica/src/components/FooterNavList/index.test.js +++ b/apps/codeforafrica/src/components/FooterNavList/index.test.js @@ -5,7 +5,6 @@ import FooterNavList from "."; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/GetInTouch/GetInTouch.test.js b/apps/codeforafrica/src/components/GetInTouch/GetInTouch.test.js index ff9f067ed..c4302faba 100644 --- a/apps/codeforafrica/src/components/GetInTouch/GetInTouch.test.js +++ b/apps/codeforafrica/src/components/GetInTouch/GetInTouch.test.js @@ -5,7 +5,6 @@ import GetInTouch from "./GetInTouch"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/GetInvolved/GetInvolved.test.js b/apps/codeforafrica/src/components/GetInvolved/GetInvolved.test.js index 60263bf9b..0eeca1a3a 100644 --- a/apps/codeforafrica/src/components/GetInvolved/GetInvolved.test.js +++ b/apps/codeforafrica/src/components/GetInvolved/GetInvolved.test.js @@ -5,7 +5,6 @@ import GetInvolved from "./GetInvolved"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/GoogleMap/GoogleMap.test.js b/apps/codeforafrica/src/components/GoogleMap/GoogleMap.test.js index 0cb1eac79..c4f0c7531 100644 --- a/apps/codeforafrica/src/components/GoogleMap/GoogleMap.test.js +++ b/apps/codeforafrica/src/components/GoogleMap/GoogleMap.test.js @@ -5,7 +5,6 @@ import GoogleMap from "./GoogleMap"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/GuidingPrinciplesCard/GuidingPrinciplesCard.test.js b/apps/codeforafrica/src/components/GuidingPrinciplesCard/GuidingPrinciplesCard.test.js index 893160f7c..aa5742d9d 100644 --- a/apps/codeforafrica/src/components/GuidingPrinciplesCard/GuidingPrinciplesCard.test.js +++ b/apps/codeforafrica/src/components/GuidingPrinciplesCard/GuidingPrinciplesCard.test.js @@ -5,7 +5,6 @@ import GuidingPrinciplesCard from "./GuidingPrinciplesCard"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/codeforafrica/src/components/GuidingPrinciplesCardList/GuidingPrinciplesCardList.test.js b/apps/codeforafrica/src/components/GuidingPrinciplesCardList/GuidingPrinciplesCardList.test.js index 7cd124af1..3d386a25b 100644 --- a/apps/codeforafrica/src/components/GuidingPrinciplesCardList/GuidingPrinciplesCardList.test.js +++ b/apps/codeforafrica/src/components/GuidingPrinciplesCardList/GuidingPrinciplesCardList.test.js @@ -5,7 +5,6 @@ import GuidingPrinciplesCardList from "./GuidingPrinciplesCardList"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/codeforafrica/src/components/Hero/Hero.test.js b/apps/codeforafrica/src/components/Hero/Hero.test.js index d9441a0f3..03a6034bb 100644 --- a/apps/codeforafrica/src/components/Hero/Hero.test.js +++ b/apps/codeforafrica/src/components/Hero/Hero.test.js @@ -5,7 +5,6 @@ import Hero from "./Hero"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/Hero/HeroText.test.js b/apps/codeforafrica/src/components/Hero/HeroText.test.js index 6b841883c..41bbbe1e9 100644 --- a/apps/codeforafrica/src/components/Hero/HeroText.test.js +++ b/apps/codeforafrica/src/components/Hero/HeroText.test.js @@ -5,7 +5,6 @@ import HeroText from "./HeroText"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/ImpactCard/ImpactCard.test.js b/apps/codeforafrica/src/components/ImpactCard/ImpactCard.test.js index 236b04831..cb818f563 100644 --- a/apps/codeforafrica/src/components/ImpactCard/ImpactCard.test.js +++ b/apps/codeforafrica/src/components/ImpactCard/ImpactCard.test.js @@ -5,7 +5,6 @@ import ImpactCard from "./ImpactCard"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/ImpactCardList/ImpactCardList.test.js b/apps/codeforafrica/src/components/ImpactCardList/ImpactCardList.test.js index b81e90e6c..a5605638d 100644 --- a/apps/codeforafrica/src/components/ImpactCardList/ImpactCardList.test.js +++ b/apps/codeforafrica/src/components/ImpactCardList/ImpactCardList.test.js @@ -5,7 +5,6 @@ import ImpactCardList from "./ImpactCardList"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/JoinOurSlack/JoinOurSlack.test.js b/apps/codeforafrica/src/components/JoinOurSlack/JoinOurSlack.test.js index a6dd65ec4..58c8bdb1c 100644 --- a/apps/codeforafrica/src/components/JoinOurSlack/JoinOurSlack.test.js +++ b/apps/codeforafrica/src/components/JoinOurSlack/JoinOurSlack.test.js @@ -5,7 +5,6 @@ import JoinOurSlack from "./JoinOurSlack"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/codeforafrica/src/components/LineClampedRichTypography/LineClampedRichTypography.test.js b/apps/codeforafrica/src/components/LineClampedRichTypography/LineClampedRichTypography.test.js index debc2188d..017376f14 100644 --- a/apps/codeforafrica/src/components/LineClampedRichTypography/LineClampedRichTypography.test.js +++ b/apps/codeforafrica/src/components/LineClampedRichTypography/LineClampedRichTypography.test.js @@ -5,7 +5,6 @@ import LineClampedRichTypography from "./LineClampedRichTypography"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/LongForm/LongForm.test.js b/apps/codeforafrica/src/components/LongForm/LongForm.test.js index c1d9dca58..fcef1bc06 100644 --- a/apps/codeforafrica/src/components/LongForm/LongForm.test.js +++ b/apps/codeforafrica/src/components/LongForm/LongForm.test.js @@ -5,7 +5,6 @@ import LongForm from "."; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/LongFormExternalEmbed/LongFormExternalEmbed.test.js b/apps/codeforafrica/src/components/LongFormExternalEmbed/LongFormExternalEmbed.test.js index bf90c6402..298c324bd 100644 --- a/apps/codeforafrica/src/components/LongFormExternalEmbed/LongFormExternalEmbed.test.js +++ b/apps/codeforafrica/src/components/LongFormExternalEmbed/LongFormExternalEmbed.test.js @@ -5,7 +5,6 @@ import LongFormExternalEmbed from "./LongFormExternalEmbed"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/LongFormMedia/LongFormMedia.test.js b/apps/codeforafrica/src/components/LongFormMedia/LongFormMedia.test.js index 3b16c453d..8e018be97 100644 --- a/apps/codeforafrica/src/components/LongFormMedia/LongFormMedia.test.js +++ b/apps/codeforafrica/src/components/LongFormMedia/LongFormMedia.test.js @@ -5,7 +5,6 @@ import LongFormMedia from "./LongFormMedia"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/LongFormRichText/LongFormRichText.test.js b/apps/codeforafrica/src/components/LongFormRichText/LongFormRichText.test.js index 8928c14eb..4ccf8d2ef 100644 --- a/apps/codeforafrica/src/components/LongFormRichText/LongFormRichText.test.js +++ b/apps/codeforafrica/src/components/LongFormRichText/LongFormRichText.test.js @@ -5,7 +5,6 @@ import LongFormRichText from "./LongFormRichText"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/MeetOurTeam/MeetOurTeam.test.js b/apps/codeforafrica/src/components/MeetOurTeam/MeetOurTeam.test.js index eb4dbba15..90dd4cda6 100644 --- a/apps/codeforafrica/src/components/MeetOurTeam/MeetOurTeam.test.js +++ b/apps/codeforafrica/src/components/MeetOurTeam/MeetOurTeam.test.js @@ -5,7 +5,6 @@ import MeetOurTeam from "./MeetOurTeam"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/MobileNavBar/MobileNavBar.test.js b/apps/codeforafrica/src/components/MobileNavBar/MobileNavBar.test.js index 823604444..d5af90def 100644 --- a/apps/codeforafrica/src/components/MobileNavBar/MobileNavBar.test.js +++ b/apps/codeforafrica/src/components/MobileNavBar/MobileNavBar.test.js @@ -5,7 +5,6 @@ import MobileNavigation from "."; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/NavBar/NavBar.test.js b/apps/codeforafrica/src/components/NavBar/NavBar.test.js index 8a6e47906..e27563ce3 100644 --- a/apps/codeforafrica/src/components/NavBar/NavBar.test.js +++ b/apps/codeforafrica/src/components/NavBar/NavBar.test.js @@ -5,7 +5,6 @@ import NavBar from "."; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/NavBarNavList/NavBarNavList.test.js b/apps/codeforafrica/src/components/NavBarNavList/NavBarNavList.test.js index b259400a2..b573b0f09 100644 --- a/apps/codeforafrica/src/components/NavBarNavList/NavBarNavList.test.js +++ b/apps/codeforafrica/src/components/NavBarNavList/NavBarNavList.test.js @@ -5,7 +5,6 @@ import NavBarNavList from "."; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/NewsAndStories/NewsAndStories.test.js b/apps/codeforafrica/src/components/NewsAndStories/NewsAndStories.test.js index 2129d1aca..3341d6443 100644 --- a/apps/codeforafrica/src/components/NewsAndStories/NewsAndStories.test.js +++ b/apps/codeforafrica/src/components/NewsAndStories/NewsAndStories.test.js @@ -5,7 +5,6 @@ import NewsAndStories from "./NewsAndStories"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/NewsletterSubscription/NewsletterSubscription.test.js b/apps/codeforafrica/src/components/NewsletterSubscription/NewsletterSubscription.test.js index 43416263e..e557bc1b7 100644 --- a/apps/codeforafrica/src/components/NewsletterSubscription/NewsletterSubscription.test.js +++ b/apps/codeforafrica/src/components/NewsletterSubscription/NewsletterSubscription.test.js @@ -5,7 +5,6 @@ import NewsletterSubscription from "./NewsletterSubscription"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/NextImageButton/NextImageButton.test.js b/apps/codeforafrica/src/components/NextImageButton/NextImageButton.test.js index 6467da4da..9a673dbd7 100644 --- a/apps/codeforafrica/src/components/NextImageButton/NextImageButton.test.js +++ b/apps/codeforafrica/src/components/NextImageButton/NextImageButton.test.js @@ -5,7 +5,6 @@ import NextImageButton from "./NextImageButton"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/NextPreviousPagination/NextPreviousPagination.test.js b/apps/codeforafrica/src/components/NextPreviousPagination/NextPreviousPagination.test.js index 501c69057..4482017f9 100644 --- a/apps/codeforafrica/src/components/NextPreviousPagination/NextPreviousPagination.test.js +++ b/apps/codeforafrica/src/components/NextPreviousPagination/NextPreviousPagination.test.js @@ -5,7 +5,6 @@ import NextPreviousPagination from "./NextPreviousPagination"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/NextPreviousPagination/PaginationButton.test.js b/apps/codeforafrica/src/components/NextPreviousPagination/PaginationButton.test.js index 01a87254d..8f1705232 100644 --- a/apps/codeforafrica/src/components/NextPreviousPagination/PaginationButton.test.js +++ b/apps/codeforafrica/src/components/NextPreviousPagination/PaginationButton.test.js @@ -5,7 +5,6 @@ import PaginationButton from "./PaginationButton"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/OfficeAddresses/OfficeAddresses.test.js b/apps/codeforafrica/src/components/OfficeAddresses/OfficeAddresses.test.js index 209ed2d2c..360b30bb4 100644 --- a/apps/codeforafrica/src/components/OfficeAddresses/OfficeAddresses.test.js +++ b/apps/codeforafrica/src/components/OfficeAddresses/OfficeAddresses.test.js @@ -5,7 +5,6 @@ import OfficeAddresses from "./OfficeAddresses"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/codeforafrica/src/components/Opportunities/Opportunities.test.js b/apps/codeforafrica/src/components/Opportunities/Opportunities.test.js index e5250e1c1..c9aead2ac 100644 --- a/apps/codeforafrica/src/components/Opportunities/Opportunities.test.js +++ b/apps/codeforafrica/src/components/Opportunities/Opportunities.test.js @@ -5,7 +5,6 @@ import Opportunities from "./Opportunities"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/OpportunityCard/OpportunityCard.js b/apps/codeforafrica/src/components/OpportunityCard/OpportunityCard.js index 77a385309..d0021c4d3 100644 --- a/apps/codeforafrica/src/components/OpportunityCard/OpportunityCard.js +++ b/apps/codeforafrica/src/components/OpportunityCard/OpportunityCard.js @@ -1,4 +1,3 @@ -/* eslint-disable camelcase */ import { Link, RichTypography } from "@commons-ui/next"; import { Box, diff --git a/apps/codeforafrica/src/components/OpportunityCard/OpportunityCard.test.js b/apps/codeforafrica/src/components/OpportunityCard/OpportunityCard.test.js index 0a616eb7b..5e580a1b5 100644 --- a/apps/codeforafrica/src/components/OpportunityCard/OpportunityCard.test.js +++ b/apps/codeforafrica/src/components/OpportunityCard/OpportunityCard.test.js @@ -5,7 +5,6 @@ import OpportunityCard from "./OpportunityCard"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/OpportunityCardList/OpportunityCardList.test.js b/apps/codeforafrica/src/components/OpportunityCardList/OpportunityCardList.test.js index 5e74f794c..c8186e8f8 100644 --- a/apps/codeforafrica/src/components/OpportunityCardList/OpportunityCardList.test.js +++ b/apps/codeforafrica/src/components/OpportunityCardList/OpportunityCardList.test.js @@ -5,7 +5,6 @@ import OpportunityCardList from "./OpportunityCardList"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/OurImpact/OurImpact.test.js b/apps/codeforafrica/src/components/OurImpact/OurImpact.test.js index 146257514..4f22ba2dc 100644 --- a/apps/codeforafrica/src/components/OurImpact/OurImpact.test.js +++ b/apps/codeforafrica/src/components/OurImpact/OurImpact.test.js @@ -5,7 +5,6 @@ import OurImpact from "./OurImpact"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/codeforafrica/src/components/OurMission/OurMission.test.js b/apps/codeforafrica/src/components/OurMission/OurMission.test.js index 37942ad65..440454847 100644 --- a/apps/codeforafrica/src/components/OurMission/OurMission.test.js +++ b/apps/codeforafrica/src/components/OurMission/OurMission.test.js @@ -5,7 +5,6 @@ import OurMission from "./OurMission"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/OurPartners/OurPartners.test.js b/apps/codeforafrica/src/components/OurPartners/OurPartners.test.js index ba3be7ae1..c7554db87 100644 --- a/apps/codeforafrica/src/components/OurPartners/OurPartners.test.js +++ b/apps/codeforafrica/src/components/OurPartners/OurPartners.test.js @@ -5,7 +5,6 @@ import OurPartners from "./OurPartners"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/OurTeam/OurTeam.test.js b/apps/codeforafrica/src/components/OurTeam/OurTeam.test.js index 3db3862a9..a6387ca7d 100644 --- a/apps/codeforafrica/src/components/OurTeam/OurTeam.test.js +++ b/apps/codeforafrica/src/components/OurTeam/OurTeam.test.js @@ -5,7 +5,6 @@ import OurTeam from "./OurTeam"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/Page/Page.test.js b/apps/codeforafrica/src/components/Page/Page.test.js index ce2724e23..a6e2742ea 100644 --- a/apps/codeforafrica/src/components/Page/Page.test.js +++ b/apps/codeforafrica/src/components/Page/Page.test.js @@ -5,7 +5,6 @@ import Page from "./Page"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/PageHeader/PageHeader.test.js b/apps/codeforafrica/src/components/PageHeader/PageHeader.test.js index 8e08e4e89..8018610e2 100644 --- a/apps/codeforafrica/src/components/PageHeader/PageHeader.test.js +++ b/apps/codeforafrica/src/components/PageHeader/PageHeader.test.js @@ -5,7 +5,6 @@ import PageHeader from "./PageHeader"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/Project/Project.test.js b/apps/codeforafrica/src/components/Project/Project.test.js index b8aa241d4..432f32853 100644 --- a/apps/codeforafrica/src/components/Project/Project.test.js +++ b/apps/codeforafrica/src/components/Project/Project.test.js @@ -5,7 +5,6 @@ import Project from "./Project"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/ProjectCard/ProjectCard.test.js b/apps/codeforafrica/src/components/ProjectCard/ProjectCard.test.js index a3a43907e..18bdbfed9 100644 --- a/apps/codeforafrica/src/components/ProjectCard/ProjectCard.test.js +++ b/apps/codeforafrica/src/components/ProjectCard/ProjectCard.test.js @@ -5,7 +5,6 @@ import ProjectCard from "./ProjectCard"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { link: {} }; diff --git a/apps/codeforafrica/src/components/ProjectCardMedia/ProjectCardMedia.test.js b/apps/codeforafrica/src/components/ProjectCardMedia/ProjectCardMedia.test.js index 91ec46f90..6a044efa7 100644 --- a/apps/codeforafrica/src/components/ProjectCardMedia/ProjectCardMedia.test.js +++ b/apps/codeforafrica/src/components/ProjectCardMedia/ProjectCardMedia.test.js @@ -5,7 +5,6 @@ import ProjectCardMedia from "./ProjectCardMedia"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ProjectDetails/ProjectDescription.test.js b/apps/codeforafrica/src/components/ProjectDetails/ProjectDescription.test.js index 50709fb91..dd3c88beb 100644 --- a/apps/codeforafrica/src/components/ProjectDetails/ProjectDescription.test.js +++ b/apps/codeforafrica/src/components/ProjectDetails/ProjectDescription.test.js @@ -5,7 +5,6 @@ import ProjectDescription from "./ProjectDescription"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/ProjectDetails/ProjectDescriptionButton.test.js b/apps/codeforafrica/src/components/ProjectDetails/ProjectDescriptionButton.test.js index ee7ac259e..ad1fbfe4e 100644 --- a/apps/codeforafrica/src/components/ProjectDetails/ProjectDescriptionButton.test.js +++ b/apps/codeforafrica/src/components/ProjectDetails/ProjectDescriptionButton.test.js @@ -5,7 +5,6 @@ import ProjectDescriptionButton from "./ProjectDescriptionButton"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/ProjectDetails/ProjectDetails.test.js b/apps/codeforafrica/src/components/ProjectDetails/ProjectDetails.test.js index 9965b3be5..d4b4c278d 100644 --- a/apps/codeforafrica/src/components/ProjectDetails/ProjectDetails.test.js +++ b/apps/codeforafrica/src/components/ProjectDetails/ProjectDetails.test.js @@ -5,7 +5,6 @@ import ProjectDetails from "./ProjectDetails"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/ProjectDetails/ProjectStakeholders.test.js b/apps/codeforafrica/src/components/ProjectDetails/ProjectStakeholders.test.js index 0b47d9ddc..8c9ba8f63 100644 --- a/apps/codeforafrica/src/components/ProjectDetails/ProjectStakeholders.test.js +++ b/apps/codeforafrica/src/components/ProjectDetails/ProjectStakeholders.test.js @@ -5,7 +5,6 @@ import ProjectStakeholders from "./ProjectStakeholders"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/ProjectPageHeader/ProjectPageHeader.test.js b/apps/codeforafrica/src/components/ProjectPageHeader/ProjectPageHeader.test.js index 835473f7b..f0cfed969 100644 --- a/apps/codeforafrica/src/components/ProjectPageHeader/ProjectPageHeader.test.js +++ b/apps/codeforafrica/src/components/ProjectPageHeader/ProjectPageHeader.test.js @@ -5,7 +5,6 @@ import ProjectPageHeader from "./ProjectPageHeader"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/ProjectTile/ProjectTile.test.js b/apps/codeforafrica/src/components/ProjectTile/ProjectTile.test.js index 1f714683b..52eb4a342 100644 --- a/apps/codeforafrica/src/components/ProjectTile/ProjectTile.test.js +++ b/apps/codeforafrica/src/components/ProjectTile/ProjectTile.test.js @@ -5,7 +5,6 @@ import ProjectTile from "./ProjectTile"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/ProjectTileList/ProjectTileList.test.js b/apps/codeforafrica/src/components/ProjectTileList/ProjectTileList.test.js index 8d8e2fb43..ba0f9bb90 100644 --- a/apps/codeforafrica/src/components/ProjectTileList/ProjectTileList.test.js +++ b/apps/codeforafrica/src/components/ProjectTileList/ProjectTileList.test.js @@ -5,7 +5,6 @@ import ProjectTileList from "./ProjectTileList"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/Projects/Projects.test.js b/apps/codeforafrica/src/components/Projects/Projects.test.js index 4494b1d15..695f5fdc0 100644 --- a/apps/codeforafrica/src/components/Projects/Projects.test.js +++ b/apps/codeforafrica/src/components/Projects/Projects.test.js @@ -5,7 +5,6 @@ import Projects from "./Projects"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/RelatedProjects/RelatedProjects.test.js b/apps/codeforafrica/src/components/RelatedProjects/RelatedProjects.test.js index 109896fd2..d017caf18 100644 --- a/apps/codeforafrica/src/components/RelatedProjects/RelatedProjects.test.js +++ b/apps/codeforafrica/src/components/RelatedProjects/RelatedProjects.test.js @@ -5,7 +5,6 @@ import RelatedProjects from "./RelatedProjects"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/RelatedStories/RelatedStories.test.js b/apps/codeforafrica/src/components/RelatedStories/RelatedStories.test.js index 4742aa706..09ae2cf9b 100644 --- a/apps/codeforafrica/src/components/RelatedStories/RelatedStories.test.js +++ b/apps/codeforafrica/src/components/RelatedStories/RelatedStories.test.js @@ -5,7 +5,6 @@ import RelatedStories from "./RelatedStories"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/RichText/RichText.test.js b/apps/codeforafrica/src/components/RichText/RichText.test.js index 2c6290739..128ebfa3b 100644 --- a/apps/codeforafrica/src/components/RichText/RichText.test.js +++ b/apps/codeforafrica/src/components/RichText/RichText.test.js @@ -5,7 +5,6 @@ import RichText from "./RichText"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/SearchInput/SearchInput.test.js b/apps/codeforafrica/src/components/SearchInput/SearchInput.test.js index 1a02170eb..fd4aec013 100644 --- a/apps/codeforafrica/src/components/SearchInput/SearchInput.test.js +++ b/apps/codeforafrica/src/components/SearchInput/SearchInput.test.js @@ -5,7 +5,6 @@ import SearchInput from "./SearchInput"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/SectionDivider/SectionDivider.test.js b/apps/codeforafrica/src/components/SectionDivider/SectionDivider.test.js index 67435b2c9..e38e6b80b 100644 --- a/apps/codeforafrica/src/components/SectionDivider/SectionDivider.test.js +++ b/apps/codeforafrica/src/components/SectionDivider/SectionDivider.test.js @@ -5,7 +5,6 @@ import SectionDivider from "./SectionDivider"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/ShareButton/ShareButton.test.js b/apps/codeforafrica/src/components/ShareButton/ShareButton.test.js index 8856a4687..9f073cb53 100644 --- a/apps/codeforafrica/src/components/ShareButton/ShareButton.test.js +++ b/apps/codeforafrica/src/components/ShareButton/ShareButton.test.js @@ -9,7 +9,6 @@ import { import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/ShareThisPage/ShareThisPage.test.js b/apps/codeforafrica/src/components/ShareThisPage/ShareThisPage.test.js index 56b10bb3c..ad89e9fef 100644 --- a/apps/codeforafrica/src/components/ShareThisPage/ShareThisPage.test.js +++ b/apps/codeforafrica/src/components/ShareThisPage/ShareThisPage.test.js @@ -5,7 +5,6 @@ import ShareThisPage from "./ShareThisPage"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/codeforafrica/src/components/SocialMediaBar/SocialMediaBar.test.js b/apps/codeforafrica/src/components/SocialMediaBar/SocialMediaBar.test.js index 2ec28b6f0..cff2d0a32 100644 --- a/apps/codeforafrica/src/components/SocialMediaBar/SocialMediaBar.test.js +++ b/apps/codeforafrica/src/components/SocialMediaBar/SocialMediaBar.test.js @@ -5,7 +5,6 @@ import SocialMediaBar from "./SocialMediaBar"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/SocialMediaButton/SocialMediaButton.test.js b/apps/codeforafrica/src/components/SocialMediaButton/SocialMediaButton.test.js index 01f2ed61e..74d91d13d 100644 --- a/apps/codeforafrica/src/components/SocialMediaButton/SocialMediaButton.test.js +++ b/apps/codeforafrica/src/components/SocialMediaButton/SocialMediaButton.test.js @@ -5,7 +5,6 @@ import SocialMediaButton from "./SocialMediaButton"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/SocialMediaButtonGroup/SocialMediaButtonGroup.test.js b/apps/codeforafrica/src/components/SocialMediaButtonGroup/SocialMediaButtonGroup.test.js index ddac64133..92b0a0baf 100644 --- a/apps/codeforafrica/src/components/SocialMediaButtonGroup/SocialMediaButtonGroup.test.js +++ b/apps/codeforafrica/src/components/SocialMediaButtonGroup/SocialMediaButtonGroup.test.js @@ -5,7 +5,6 @@ import SocialMediaButtonGroup from "./SocialMediaButtonGroup"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/codeforafrica/src/components/TeamMemberCard/TeamMemberCard.test.js b/apps/codeforafrica/src/components/TeamMemberCard/TeamMemberCard.test.js index 0b8fcf00c..cdaff7d50 100644 --- a/apps/codeforafrica/src/components/TeamMemberCard/TeamMemberCard.test.js +++ b/apps/codeforafrica/src/components/TeamMemberCard/TeamMemberCard.test.js @@ -5,7 +5,6 @@ import TeamMemberCard from "./TeamMemberCard"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/TeamMemberCardList/TeamMemberCardList.test.js b/apps/codeforafrica/src/components/TeamMemberCardList/TeamMemberCardList.test.js index 0cbc87005..35095a2a3 100644 --- a/apps/codeforafrica/src/components/TeamMemberCardList/TeamMemberCardList.test.js +++ b/apps/codeforafrica/src/components/TeamMemberCardList/TeamMemberCardList.test.js @@ -5,7 +5,6 @@ import TeamMemberCardList from "./TeamMemberCardList"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); describe("", () => { diff --git a/apps/codeforafrica/src/components/TeamMembers/TeamMembers.test.js b/apps/codeforafrica/src/components/TeamMembers/TeamMembers.test.js index fcff42135..1b14c45a0 100644 --- a/apps/codeforafrica/src/components/TeamMembers/TeamMembers.test.js +++ b/apps/codeforafrica/src/components/TeamMembers/TeamMembers.test.js @@ -5,7 +5,6 @@ import TeamMembers from "./TeamMembers"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/TooltipButton/TooltipButton.test.js b/apps/codeforafrica/src/components/TooltipButton/TooltipButton.test.js index 3be760b13..6a77fd3f4 100644 --- a/apps/codeforafrica/src/components/TooltipButton/TooltipButton.test.js +++ b/apps/codeforafrica/src/components/TooltipButton/TooltipButton.test.js @@ -5,7 +5,6 @@ import TooltipButton from "./TooltipButton"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/src/components/TwoToneBackground/TwoToneBackground.test.js b/apps/codeforafrica/src/components/TwoToneBackground/TwoToneBackground.test.js index f3410c5ba..6fa971fb2 100644 --- a/apps/codeforafrica/src/components/TwoToneBackground/TwoToneBackground.test.js +++ b/apps/codeforafrica/src/components/TwoToneBackground/TwoToneBackground.test.js @@ -5,7 +5,6 @@ import TwoToneBackground from "./TwoToneBackground"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = {}; diff --git a/apps/codeforafrica/src/pages/_error.test.js b/apps/codeforafrica/src/pages/_error.test.js index f15c14783..c5a949101 100644 --- a/apps/codeforafrica/src/pages/_error.test.js +++ b/apps/codeforafrica/src/pages/_error.test.js @@ -5,7 +5,6 @@ import CustomError from "./_error.page"; import theme from "@/codeforafrica/theme"; -// eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); const defaultProps = { diff --git a/apps/codeforafrica/tsconfig.json b/apps/codeforafrica/tsconfig.json index 44ba0056d..1404a29e5 100644 --- a/apps/codeforafrica/tsconfig.json +++ b/apps/codeforafrica/tsconfig.json @@ -18,7 +18,8 @@ "@/codeforafrica/*": ["./src/*"], "@/commons-ui/core/*": ["../../packages/commons-ui-core/src/*"], "@/commons-ui/next/*": ["../../packages/commons-ui-next/src/*"] - } + }, + "target": "ES2017" }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "exclude": ["build", "dist", "node_modules"] diff --git a/apps/pesayetu/.eslintrc.js b/apps/pesayetu/.eslintrc.js deleted file mode 100644 index 468a5ff74..000000000 --- a/apps/pesayetu/.eslintrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - root: true, - extends: ["eslint-config-commons-ui/next"], - settings: { - "import/resolver": { - webpack: { - config: "./eslint.webpack.config.js", - }, - }, - }, -}; diff --git a/apps/pesayetu/.storybook/main.js b/apps/pesayetu/.storybook/main.js index 748ad2e17..e4963218a 100644 --- a/apps/pesayetu/.storybook/main.js +++ b/apps/pesayetu/.storybook/main.js @@ -1,6 +1,11 @@ import { dirname, join } from "path"; + +function getAbsolutePath(value) { + return dirname(require.resolve(join(value, "package.json"))); +} + /** @type { import('@storybook/nextjs').StorybookConfig } */ -const config = { +const storybookConfig = { addons: [ getAbsolutePath("@storybook/addon-links"), getAbsolutePath("@storybook/addon-essentials"), @@ -15,20 +20,21 @@ const config = { "../src/components/**/*.mdx", "../src/components/**/*.stories.@(js|jsx|ts|tsx)", ], - webpackFinal: async (config) => { - config.module = config.module || {}; - config.module.rules = config.module.rules || []; + webpackFinal: async (webpackConfig) => { + /* eslint no-param-reassign: "off" */ + webpackConfig.module = webpackConfig.module || {}; + webpackConfig.module.rules = webpackConfig.module.rules || []; // Exclude .svg files so that we can use @svgr/webpack below - const imageRule = config.module.rules.find((rule) => - rule?.["test"]?.test(".svg"), + const imageRule = webpackConfig.module.rules.find((rule) => + rule?.test?.test(".svg"), ); if (imageRule) { - imageRule["exclude"] = /\.svg$/; + imageRule.exclude = /\.svg$/; } // Configure .svg files to be loaded with @svgr/webpack - config.module.rules.push({ + webpackConfig.module.rules.push({ test: /\.svg$/, use: [ "@svgr/webpack", @@ -39,12 +45,8 @@ const config = { ], }); - return config; + return webpackConfig; }, }; -export default config; - -function getAbsolutePath(value) { - return dirname(require.resolve(join(value, "package.json"))); -} +export default storybookConfig; diff --git a/apps/pesayetu/.storybook/preview.js b/apps/pesayetu/.storybook/preview.js index 695faea06..308d59d3c 100644 --- a/apps/pesayetu/.storybook/preview.js +++ b/apps/pesayetu/.storybook/preview.js @@ -1,4 +1,5 @@ import { ThemeProvider } from "@mui/material/styles"; + import theme from "@/pesayetu/theme"; // import createTheme from "@commons-ui/core/styles/createTheme"; diff --git a/apps/pesayetu/package.json b/apps/pesayetu/package.json index fb962d8e9..32314feea 100644 --- a/apps/pesayetu/package.json +++ b/apps/pesayetu/package.json @@ -24,7 +24,7 @@ "dev": "NODE_OPTIONS='--inspect' next dev", "storybook": "storybook dev -p 6006", "lint-check": "TIMING=1 eslint './'", - "lint": "TIMING=1 eslint --fix './'", + "lint": "TIMING=1 eslint --flag unstable_config_lookup_from_file --fix './'", "jest": "jest --passWithNoTests", "playwright": "npx playwright test", "build": "next build", diff --git a/apps/pesayetu/playwright.config.js b/apps/pesayetu/playwright.config.js index 317c83d64..ce0b9a6e1 100644 --- a/apps/pesayetu/playwright.config.js +++ b/apps/pesayetu/playwright.config.js @@ -1,2 +1 @@ -/* eslint-disable import/no-extraneous-dependencies */ module.exports = require("playwright-config-commons-ui"); diff --git a/apps/pesayetu/src/components/Button/index.stories.js b/apps/pesayetu/src/components/Button/index.stories.js index a71f49941..984ca696e 100644 --- a/apps/pesayetu/src/components/Button/index.stories.js +++ b/apps/pesayetu/src/components/Button/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import { Button } from "@mui/material"; import React from "react"; diff --git a/apps/pesayetu/src/components/DataIndicators/index.stories.js b/apps/pesayetu/src/components/DataIndicators/index.stories.js index 446699d29..94429efce 100644 --- a/apps/pesayetu/src/components/DataIndicators/index.stories.js +++ b/apps/pesayetu/src/components/DataIndicators/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import React from "react"; import DataIndicators from "."; diff --git a/apps/pesayetu/src/components/DataVisualisationGuide/index.stories.js b/apps/pesayetu/src/components/DataVisualisationGuide/index.stories.js index 784b0fdb4..5083a6ce2 100644 --- a/apps/pesayetu/src/components/DataVisualisationGuide/index.stories.js +++ b/apps/pesayetu/src/components/DataVisualisationGuide/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import React from "react"; import DataVisuals from "."; diff --git a/apps/pesayetu/src/components/ExploreOtherTools/index.stories.js b/apps/pesayetu/src/components/ExploreOtherTools/index.stories.js index e3b130cd1..8b11d2015 100644 --- a/apps/pesayetu/src/components/ExploreOtherTools/index.stories.js +++ b/apps/pesayetu/src/components/ExploreOtherTools/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import React from "react"; import ExploreOtherTools from "."; diff --git a/apps/pesayetu/src/components/Footer/index.js b/apps/pesayetu/src/components/Footer/index.js index bed142932..4c73f4bb3 100644 --- a/apps/pesayetu/src/components/Footer/index.js +++ b/apps/pesayetu/src/components/Footer/index.js @@ -1,5 +1,3 @@ -/* eslint-disable react/default-props-match-prop-types */ - import { StayInTouch, QuickLinks, diff --git a/apps/pesayetu/src/components/Footer/index.stories.js b/apps/pesayetu/src/components/Footer/index.stories.js index b508d53c2..2932a5561 100644 --- a/apps/pesayetu/src/components/Footer/index.stories.js +++ b/apps/pesayetu/src/components/Footer/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import React from "react"; import Footer from "."; diff --git a/apps/pesayetu/src/components/HURUmap/Chart/index.stories.js b/apps/pesayetu/src/components/HURUmap/Chart/index.stories.js index 218bc1030..91b545042 100644 --- a/apps/pesayetu/src/components/HURUmap/Chart/index.stories.js +++ b/apps/pesayetu/src/components/HURUmap/Chart/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import React from "react"; import Chart from "@/pesayetu/components/HURUmap/Chart"; diff --git a/apps/pesayetu/src/components/Header/index.stories.js b/apps/pesayetu/src/components/Header/index.stories.js index 7cf2b709c..a79a3d039 100644 --- a/apps/pesayetu/src/components/Header/index.stories.js +++ b/apps/pesayetu/src/components/Header/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import React from "react"; import Header from "."; diff --git a/apps/pesayetu/src/components/InsightsData/index.stories.js b/apps/pesayetu/src/components/InsightsData/index.stories.js index 7a6557da4..386635c29 100644 --- a/apps/pesayetu/src/components/InsightsData/index.stories.js +++ b/apps/pesayetu/src/components/InsightsData/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import React from "react"; import InsightsData from "@/pesayetu/components/InsightsData"; diff --git a/apps/pesayetu/src/components/Link/index.js b/apps/pesayetu/src/components/Link/index.js index 435de4880..a9c7f1eba 100644 --- a/apps/pesayetu/src/components/Link/index.js +++ b/apps/pesayetu/src/components/Link/index.js @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/anchor-has-content */ import { A } from "@commons-ui/core"; import { Link as MuiLink } from "@mui/material"; import clsx from "clsx"; diff --git a/apps/pesayetu/src/components/OtherHero/index.stories.js b/apps/pesayetu/src/components/OtherHero/index.stories.js index 55ce835c3..1d86dd639 100644 --- a/apps/pesayetu/src/components/OtherHero/index.stories.js +++ b/apps/pesayetu/src/components/OtherHero/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import React from "react"; import Hero from "."; diff --git a/apps/pesayetu/src/components/SourcesFilter/index.stories.js b/apps/pesayetu/src/components/SourcesFilter/index.stories.js index 2686c29d0..dc9d32b70 100644 --- a/apps/pesayetu/src/components/SourcesFilter/index.stories.js +++ b/apps/pesayetu/src/components/SourcesFilter/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import React from "react"; import SourcesFilter from "."; diff --git a/apps/pesayetu/src/components/StoriesInsights/index.stories.js b/apps/pesayetu/src/components/StoriesInsights/index.stories.js index a8e2123f0..2fa37456c 100644 --- a/apps/pesayetu/src/components/StoriesInsights/index.stories.js +++ b/apps/pesayetu/src/components/StoriesInsights/index.stories.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import React from "react"; import StoriesInsights from "@/pesayetu/components/StoriesInsights"; diff --git a/apps/pesayetu/src/next-seo.config.js b/apps/pesayetu/src/next-seo.config.js index b6565375f..eee0ff40e 100644 --- a/apps/pesayetu/src/next-seo.config.js +++ b/apps/pesayetu/src/next-seo.config.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-anonymous-default-export */ import site from "@/pesayetu/utils/site"; export default { diff --git a/apps/promisetracker/.eslintignore b/apps/promisetracker/.eslintignore deleted file mode 100644 index 63daf1ddf..000000000 --- a/apps/promisetracker/.eslintignore +++ /dev/null @@ -1,31 +0,0 @@ -# dependencies -node_modules -.pnp -.pnp.js -.pnpm-debug.log - -# testing -coverage - -# next.js -.next/ -out/ -build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Vercel -.vercel -.now - -# turbo -.turbo -test-results/ -playwright-report/ diff --git a/apps/promisetracker/.eslintrc.js b/apps/promisetracker/.eslintrc.js deleted file mode 100644 index 468a5ff74..000000000 --- a/apps/promisetracker/.eslintrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - root: true, - extends: ["eslint-config-commons-ui/next"], - settings: { - "import/resolver": { - webpack: { - config: "./eslint.webpack.config.js", - }, - }, - }, -}; diff --git a/apps/promisetracker/package.json b/apps/promisetracker/package.json index cafc7ae02..e6264638c 100644 --- a/apps/promisetracker/package.json +++ b/apps/promisetracker/package.json @@ -80,7 +80,7 @@ "scripts": { "dev": "NODE_OPTIONS='--inspect' next dev --port 3001", "lint-check": "TIMING=1 eslint './'", - "lint": "TIMING=1 eslint --fix './'", + "lint": "TIMING=1 eslint --flag unstable_config_lookup_from_file --fix './'", "build": "next build", "start": "next start", "clean": "rm -rf .next .turbo node_modules" diff --git a/apps/promisetracker/playwright.config.js b/apps/promisetracker/playwright.config.js index 58cb68f20..3a1a15e4e 100644 --- a/apps/promisetracker/playwright.config.js +++ b/apps/promisetracker/playwright.config.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ const defaultConfig = require("playwright-config-commons-ui"); const { use, webServer } = defaultConfig; diff --git a/apps/promisetracker/src/lib/wp/index.js b/apps/promisetracker/src/lib/wp/index.js index f532ad1cb..782e981c5 100644 --- a/apps/promisetracker/src/lib/wp/index.js +++ b/apps/promisetracker/src/lib/wp/index.js @@ -184,7 +184,7 @@ function wp(site) { return undefined; } - // eslint-disable-next-line no-underscore-dangle + /* eslint no-underscore-dangle: off */ const embedded = resource._embedded; const post = { diff --git a/apps/promisetracker/src/pages/_app.page.js b/apps/promisetracker/src/pages/_app.page.js index 5cbcfd4c3..b42c30c9b 100644 --- a/apps/promisetracker/src/pages/_app.page.js +++ b/apps/promisetracker/src/pages/_app.page.js @@ -10,7 +10,7 @@ import SEO from "@/promisetracker/next-seo.config"; import theme from "@/promisetracker/theme/index"; // simplebar-react has a hard dependency on simplebar -// eslint-disable-next-line import/no-extraneous-dependencies + import "simplebar-react/dist/simplebar.min.css"; export default function MyApp(props) { diff --git a/apps/promisetracker/src/utils/index.js b/apps/promisetracker/src/utils/index.js index 586ab6895..4aac31b69 100644 --- a/apps/promisetracker/src/utils/index.js +++ b/apps/promisetracker/src/utils/index.js @@ -20,7 +20,7 @@ export function slugify(string) { export function groupPromisesByStatus(promises) { return { count: promises.length, - /* eslint-disable no-param-reassign */ + /* eslint no-param-reassign: "off" */ statusHistory: promises.reduce((promiseByStatus, promise) => { (promiseByStatus[promise.status.title] = promiseByStatus[promise.status.title] || []).push(promise); diff --git a/apps/roboshield/.eslintignore b/apps/roboshield/.eslintignore deleted file mode 100644 index 19d6cb9ac..000000000 --- a/apps/roboshield/.eslintignore +++ /dev/null @@ -1,36 +0,0 @@ -# dependencies -node_modules -.pnp -.pnp.js -.pnpm-debug.log - -# typescript -dist/ - -# testing -coverage - -# next.js -.next/ -out/ - -# payload -build/ - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Vercel -.vercel -.now - -# turbo -.turbo -test-results/ -playwright-report/ diff --git a/apps/roboshield/.eslintrc.js b/apps/roboshield/.eslintrc.js deleted file mode 100644 index 6c9302824..000000000 --- a/apps/roboshield/.eslintrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - root: true, - extends: ["next/core-web-vitals", "plugin:prettier/recommended"], - settings: { - "import/resolver": { - webpack: { - config: "./eslint.webpack.config.js", - }, - }, - }, -}; diff --git a/apps/roboshield/eslint.config.js b/apps/roboshield/eslint.config.js new file mode 100644 index 000000000..f32e072f8 --- /dev/null +++ b/apps/roboshield/eslint.config.js @@ -0,0 +1,32 @@ +const eslintConfig = require("eslint-config-commons-ui/next"); + +module.exports = [ + { + settings: { + "import/resolver": { + webpack: { + config: "./eslint.webpack.config.js", + }, + typescript: { + alwaysTryTypes: false, + project: "./tsconfig.json", + }, + }, + }, + }, + { + rules: { + "react/jsx-filename-extension": [1, { extensions: [".js", ".tsx"] }], // This rule allows JSX syntax in both .js and tsx files + // Disable requirement for importing file extensions for js and tsx files, without this we cant import custom components in Payload + "import/extensions": [ + "error", + "ignorePackages", + { + js: "never", + tsx: "never", + }, + ], + }, + }, + ...eslintConfig, +]; diff --git a/apps/roboshield/next.config.js b/apps/roboshield/next.config.js index eb077d031..9bf4274bc 100644 --- a/apps/roboshield/next.config.js +++ b/apps/roboshield/next.config.js @@ -1,6 +1,7 @@ -const { withSentryConfig } = require("@sentry/nextjs"); const path = require("path"); +const { withSentryConfig } = require("@sentry/nextjs"); + const PROJECT_ROOT = process.env.PROJECT_ROOT?.trim(); const outputFileTracingRoot = PROJECT_ROOT ? path.resolve(__dirname, PROJECT_ROOT) diff --git a/apps/roboshield/package.json b/apps/roboshield/package.json index 1b621420d..14ce71565 100644 --- a/apps/roboshield/package.json +++ b/apps/roboshield/package.json @@ -69,12 +69,14 @@ "eslint": "catalog:", "eslint-config-next": "catalog:", "eslint-config-prettier": "catalog:", + "eslint-import-resolver-typescript": "catalog:", "eslint-import-resolver-webpack": "catalog:", "eslint-plugin-import": "catalog:", "jest": "catalog:", "jest-config-commons-ui": "workspace:*", "prettier": "catalog:", "tsx": "catalog:", - "typescript": "catalog:" + "typescript": "catalog:", + "typescript-eslint": "catalog:" } } diff --git a/apps/roboshield/src/next-seo.config.js b/apps/roboshield/src/next-seo.config.ts similarity index 100% rename from apps/roboshield/src/next-seo.config.js rename to apps/roboshield/src/next-seo.config.ts diff --git a/apps/roboshield/tsconfig.json b/apps/roboshield/tsconfig.json index eb2f2f483..44a7b525c 100644 --- a/apps/roboshield/tsconfig.json +++ b/apps/roboshield/tsconfig.json @@ -22,7 +22,8 @@ "@/commons-ui/core/*": ["../../packages/commons-ui-core/src/*"], "@/commons-ui/next/*": ["../../packages/commons-ui-next/src/*"], "@/root/*": ["./*"] - } + }, + "target": "ES2017" }, "include": [ "next-env.d.ts", diff --git a/apps/roboshield/turbo.json b/apps/roboshield/turbo.json new file mode 100644 index 000000000..f0e9a6b18 --- /dev/null +++ b/apps/roboshield/turbo.json @@ -0,0 +1,26 @@ +{ + "extends": ["//"], + "tasks": { + "build": { + "dependsOn": ["^build", "build-next", "build-payload"] + }, + "build-next": { + "outputs": [".next/**", "!.next/cache/**", "dist/**"], + "env": [ + "PROJECT_ROOT", + "SENTRY_AUTH_TOKEN", + "SENTRY_ORG", + "SENTRY_PROJECT" + ] + }, + "build-payload": { + "outputs": ["build/**"], + "env": [ + "NEXT_PUBLIC_SENTRY_DSN", + "PAYLOAD_PUBLIC_APP_URL", + "PAYLOAD_PUBLIC_DEFAULT_LOCALE", + "PAYLOAD_PUBLIC_LOCALES" + ] + } + } +} diff --git a/apps/techlabblog/.eslintrc.js b/apps/techlabblog/.eslintrc.js deleted file mode 100644 index 33fc2da49..000000000 --- a/apps/techlabblog/.eslintrc.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - root: true, - extends: [ - "next/core-web-vitals", - "plugin:prettier/recommended", - "plugin:mdx/recommended", - ], - settings: { - "import/resolver": { - webpack: { - config: "./eslint.webpack.config.js", - }, - }, - "mdx/code-blocks": true, - }, -}; diff --git a/apps/techlabblog/eslint.config.js b/apps/techlabblog/eslint.config.js new file mode 100644 index 000000000..cf8c9ee92 --- /dev/null +++ b/apps/techlabblog/eslint.config.js @@ -0,0 +1,32 @@ +const eslintConfig = require("eslint-config-commons-ui/next"); + +module.exports = [ + { + settings: { + "import/resolver": { + webpack: { + config: "./eslint.webpack.config.js", + }, + typescript: { + alwaysTryTypes: false, + project: "./tsconfig.json", + }, + }, + }, + }, + ...eslintConfig, + { + rules: { + "react/jsx-filename-extension": [1, { extensions: [".js", ".tsx"] }], // This rule allows JSX syntax in both .js and tsx files + // Disable requirement for importing file extensions for js and tsx files, without this we cant import custom components in Payload + "import/extensions": [ + "error", + "ignorePackages", + { + js: "never", + tsx: "never", + }, + ], + }, + }, +]; diff --git a/apps/techlabblog/tsconfig.json b/apps/techlabblog/tsconfig.json index 56a2de0e9..ca28fd2f3 100644 --- a/apps/techlabblog/tsconfig.json +++ b/apps/techlabblog/tsconfig.json @@ -21,7 +21,8 @@ "@/techlabblog/*": ["./*"], "@/commons-ui/core/*": ["../../packages/commons-ui-core/src/*"], "@/commons-ui/next/*": ["../../packages/commons-ui-next/src/*"] - } + }, + "target": "ES2017" }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"] diff --git a/apps/uibook/.eslintignore b/apps/uibook/.eslintignore deleted file mode 100644 index fa78755c1..000000000 --- a/apps/uibook/.eslintignore +++ /dev/null @@ -1,34 +0,0 @@ -# dependencies -node_modules -.pnp -.pnp.js -.pnpm-debug.log - -# testing -coverage - -# next.js -.next/ -out/ -build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Vercel -.vercel -.now - -# turbo -.turbo -test-results/ -playwright-report/ - -# Storybook -storybook-static diff --git a/apps/uibook/.eslintrc.js b/apps/uibook/.eslintrc.js deleted file mode 100644 index 468a5ff74..000000000 --- a/apps/uibook/.eslintrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - root: true, - extends: ["eslint-config-commons-ui/next"], - settings: { - "import/resolver": { - webpack: { - config: "./eslint.webpack.config.js", - }, - }, - }, -}; diff --git a/apps/uibook/.storybook/main.js b/apps/uibook/.storybook/main.js index 261c72b9c..b74a8c506 100644 --- a/apps/uibook/.storybook/main.js +++ b/apps/uibook/.storybook/main.js @@ -1,5 +1,10 @@ import { dirname, join } from "path"; /** @type { import('@storybook/nextjs').StorybookConfig } */ + +function getAbsolutePath(value) { + return dirname(require.resolve(join(value, "package.json"))); +} + const config = { addons: [ getAbsolutePath("@storybook/addon-links"), @@ -15,7 +20,3 @@ const config = { }; export default config; - -function getAbsolutePath(value) { - return dirname(require.resolve(join(value, "package.json"))); -} diff --git a/apps/uibook/.storybook/preview.js b/apps/uibook/.storybook/preview.js index af22abd20..83cb8f763 100644 --- a/apps/uibook/.storybook/preview.js +++ b/apps/uibook/.storybook/preview.js @@ -1,5 +1,5 @@ -import { ThemeProvider } from "@mui/material/styles"; import { createTheme } from "@commons-ui/core"; +import { ThemeProvider } from "@mui/material/styles"; // import createTheme from "@commons-ui/core/styles/createTheme"; import "./styles.css"; diff --git a/apps/uibook/eslint.config.js b/apps/uibook/eslint.config.js new file mode 100644 index 000000000..b11205528 --- /dev/null +++ b/apps/uibook/eslint.config.js @@ -0,0 +1,14 @@ +const eslintConfig = require("eslint-config-commons-ui/next"); + +module.exports = [ + ...eslintConfig, + { + settings: { + "import/resolver": { + webpack: { + config: "./eslint.webpack.config.js", + }, + }, + }, + }, +]; diff --git a/apps/uibook/package.json b/apps/uibook/package.json index 1edbb061c..adea1ff7b 100644 --- a/apps/uibook/package.json +++ b/apps/uibook/package.json @@ -24,7 +24,7 @@ "dev": "storybook dev -p 6006", "build": "storybook build", "lint-check": "TIMING=1 eslint './'", - "lint": "TIMING=1 eslint --fix './'", + "lint": "TIMING=1 eslint --flag unstable_config_lookup_from_file --fix './'", "clean": "rm -rf .next .turbo node_modules storybook-static" }, "dependencies": { diff --git a/apps/vpnmanager/.eslintignore b/apps/vpnmanager/.eslintignore deleted file mode 100644 index 19d6cb9ac..000000000 --- a/apps/vpnmanager/.eslintignore +++ /dev/null @@ -1,36 +0,0 @@ -# dependencies -node_modules -.pnp -.pnp.js -.pnpm-debug.log - -# typescript -dist/ - -# testing -coverage - -# next.js -.next/ -out/ - -# payload -build/ - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Vercel -.vercel -.now - -# turbo -.turbo -test-results/ -playwright-report/ diff --git a/apps/vpnmanager/.eslintrc.js b/apps/vpnmanager/.eslintrc.js deleted file mode 100644 index 3f85dfc73..000000000 --- a/apps/vpnmanager/.eslintrc.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - root: true, - extends: ["next/core-web-vitals", "plugin:prettier/recommended"], -}; diff --git a/apps/vpnmanager/eslint.config.js b/apps/vpnmanager/eslint.config.js new file mode 100644 index 000000000..cf8c9ee92 --- /dev/null +++ b/apps/vpnmanager/eslint.config.js @@ -0,0 +1,32 @@ +const eslintConfig = require("eslint-config-commons-ui/next"); + +module.exports = [ + { + settings: { + "import/resolver": { + webpack: { + config: "./eslint.webpack.config.js", + }, + typescript: { + alwaysTryTypes: false, + project: "./tsconfig.json", + }, + }, + }, + }, + ...eslintConfig, + { + rules: { + "react/jsx-filename-extension": [1, { extensions: [".js", ".tsx"] }], // This rule allows JSX syntax in both .js and tsx files + // Disable requirement for importing file extensions for js and tsx files, without this we cant import custom components in Payload + "import/extensions": [ + "error", + "ignorePackages", + { + js: "never", + tsx: "never", + }, + ], + }, + }, +]; diff --git a/apps/vpnmanager/eslint.webpack.config.js b/apps/vpnmanager/eslint.webpack.config.js new file mode 100644 index 000000000..1fb392566 --- /dev/null +++ b/apps/vpnmanager/eslint.webpack.config.js @@ -0,0 +1,30 @@ +const path = require("path"); + +module.exports = { + module: { + rules: [ + { + test: /\.svg$/i, + type: "asset", + resourceQuery: /url/, // *.svg?url + }, + { + test: /\.svg$/i, + issuer: /\.[jt]sx?$/, + resourceQuery: { not: [/url/] }, // exclude react component if *.svg?url + use: ["@svgr/webpack"], + }, + ], + }, + resolve: { + alias: { + "@/vpnmanager": path.resolve(__dirname, "src/"), + content: path.resolve(__dirname, "content/"), + }, + extensions: [".js"], + }, + typescript: { + alwaysTryTypes: false, + project: "./tsconfig.json", + }, +}; diff --git a/apps/vpnmanager/package.json b/apps/vpnmanager/package.json index f28a9cb84..671974e1a 100644 --- a/apps/vpnmanager/package.json +++ b/apps/vpnmanager/package.json @@ -47,6 +47,7 @@ "eslint": "catalog:", "eslint-config-next": "catalog:", "eslint-config-prettier": "catalog:", - "typescript": "catalog:" + "typescript": "catalog:", + "typescript-eslint": "catalog:" } } diff --git a/apps/vpnmanager/src/components/DesktopNavBar/DesktopNavBar.tsx b/apps/vpnmanager/src/components/DesktopNavBar/DesktopNavBar.tsx index bd9debd47..493e59e3d 100644 --- a/apps/vpnmanager/src/components/DesktopNavBar/DesktopNavBar.tsx +++ b/apps/vpnmanager/src/components/DesktopNavBar/DesktopNavBar.tsx @@ -1,7 +1,6 @@ +import { Box, Grid, Grid2Props, SxProps } from "@mui/material"; import React, { ForwardedRef } from "react"; -import { Box, Grid, Grid2Props } from "@mui/material"; - import type { Menu, SocialMediaLink, @@ -13,6 +12,7 @@ interface Props extends Grid2Props { logo: any; menus: Menu[]; socialLinks: SocialMediaLink[]; + sx?: SxProps; } const DesktopNavBar = React.forwardRef(function DesktopNavBar( diff --git a/apps/vpnmanager/src/components/MobileNavBar/MobileNavBar.tsx b/apps/vpnmanager/src/components/MobileNavBar/MobileNavBar.tsx index f3b4a6983..d83812839 100644 --- a/apps/vpnmanager/src/components/MobileNavBar/MobileNavBar.tsx +++ b/apps/vpnmanager/src/components/MobileNavBar/MobileNavBar.tsx @@ -8,15 +8,15 @@ import { SlideProps, SvgIcon, } from "@mui/material"; -import { styled } from "@mui/material/styles"; +import { SxProps, styled } from "@mui/material/styles"; import React, { ForwardedRef } from "react"; +import menuIcon from "@/vpnmanager/assets/icons/menu-icon.svg"; +import CloseIcon from "@/vpnmanager/assets/icons/Type=x, Size=24, Color=CurrentColor.svg"; import type { Menu, SocialMediaLink, } from "@/vpnmanager/components/NavBarNavList"; -import menuIcon from "@/vpnmanager/assets/icons/menu-icon.svg"; -import CloseIcon from "@/vpnmanager/assets/icons/Type=x, Size=24, Color=CurrentColor.svg"; import NavBarNavList from "@/vpnmanager/components/NavBarNavList"; import NextImageButton from "@/vpnmanager/components/NextImageButton"; @@ -24,6 +24,7 @@ interface Props extends Grid2Props { logo: any; menus: Menu[]; socialLinks: SocialMediaLink[]; + sx?: SxProps; } const DialogContainer = styled(Dialog)(({ theme: { palette, spacing } }) => ({ diff --git a/apps/vpnmanager/src/components/NavBarNavList/NavBarNavList.tsx b/apps/vpnmanager/src/components/NavBarNavList/NavBarNavList.tsx index ae1576878..8d6770e75 100644 --- a/apps/vpnmanager/src/components/NavBarNavList/NavBarNavList.tsx +++ b/apps/vpnmanager/src/components/NavBarNavList/NavBarNavList.tsx @@ -2,6 +2,7 @@ import { NavList, NavListItem, SocialMediaIconLink } from "@commons-ui/core"; import { Link } from "@commons-ui/next"; import type { LinkProps } from "@mui/material"; import React from "react"; + import UserAvatar from "@/vpnmanager/components/UserAvatar"; interface NavListItemProps extends LinkProps {} diff --git a/apps/vpnmanager/src/components/Statistics/Statistics.tsx b/apps/vpnmanager/src/components/Statistics/Statistics.tsx index 8bf56b1dc..1169ca07b 100644 --- a/apps/vpnmanager/src/components/Statistics/Statistics.tsx +++ b/apps/vpnmanager/src/components/Statistics/Statistics.tsx @@ -1,4 +1,5 @@ -import React, { useEffect, useRef, useState } from "react"; +import { Section } from "@commons-ui/core"; +import { Link } from "@commons-ui/next"; import { Box, Table, @@ -13,12 +14,11 @@ import { Button, TablePagination, } from "@mui/material"; -import { Section } from "@commons-ui/core"; +import { format, startOfYesterday } from "date-fns"; import { useRouter } from "next/router"; +import React, { useEffect, useRef, useState } from "react"; import { fetchJson, formatBytes } from "@/vpnmanager/utils"; -import { Link } from "@commons-ui/next"; -import { format, startOfYesterday } from "date-fns"; export interface Data { ID: number; @@ -152,7 +152,7 @@ const Statistics: React.FC = ({ data: result }) => { name="date" type="date" variant="outlined" - value={filters["date"]} + value={filters.date} onChange={handleFilterChange} placeholder="Date Start" size="small" @@ -234,7 +234,7 @@ const Statistics: React.FC = ({ data: result }) => {