chore(lint): unblock next lint and fix current eslint errors

This commit is contained in:
2026-03-13 06:24:38 +00:00
parent 903118e47d
commit 344b6efed1
10 changed files with 815 additions and 1085 deletions
@@ -727,11 +727,11 @@ const RepCompleteSubmit = (props) => {
{" "}
</strong>
</div>{" "}
<a className="govuk-link" href="/">
<Link className="govuk-link" href="/">
{t(
"myrepresentations:return-to-myportal-link"
)}
</a>
</Link>
</>
) : (
<>
+2 -5
View File
@@ -1,5 +1,4 @@
import Link from "next/link";
import { useRouter } from "next/router";
export function capitalizeFirstLetter(val) {
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
@@ -44,11 +43,9 @@ export function hasOwnPropertyAndNotNull(obj, property) {
return obj.hasOwnProperty(property) && obj[property] !== null;
}
export function linkedCasesList(linkedCasesReference) {
export function linkedCasesList(linkedCasesReference, locale) {
//console.log(linkedCasesReference);
const router = useRouter();
linkedCasesReference = linkedCasesReference.value || [];
return (
@@ -59,7 +56,7 @@ export function linkedCasesList(linkedCasesReference) {
<li key={key}>
<Link
href={
router.locale == "cy"
locale == "cy"
? "/canlyniadauchwilio?q=" +
item.title +
"&lk=1"
+2 -2
View File
@@ -18,7 +18,7 @@ const GoogleMapComponent = (props) => {
let marker = new maps.Marker({
position: { lat: dataArray[i].lat, lng: dataArray[i].lng },
map,
label: dataArray[i].id,
label: dataArray[i].id
});
}
};
@@ -78,7 +78,7 @@ const GoogleMapComponent = (props) => {
}
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
width={"100%"}
maxheight={"400px"}
style={{ maxHeight: "400px" }}
height={"500px"}
className={"mappingFrame"}
></iframe>
+2 -2
View File
@@ -351,9 +351,9 @@ let BuildCheckSection = (props) => {
{" "}
</strong>
</div>{" "}
<a className="govuk-link" href="/">
<Link className="govuk-link" href="/">
{t("newappeal:return-to-myportal-link")}
</a>
</Link>
</>
) : (
<>
+1 -1
View File
@@ -975,7 +975,7 @@ const DNSSearchResults = (props) => {
}
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
width={"100%"}
maxheight={"400px"}
style={{ maxHeight: "400px" }}
height={"500px"}
className={"mappingFrame"}
></iframe>
+2 -1
View File
@@ -1,6 +1,7 @@
import useTranslation from "next-translate/useTranslation";
import { useRouter } from "next/router";
import _ from "lodash";
import Link from "next/link";
const RepsOnResults = (props) => {
let { t } = useTranslation();
@@ -155,7 +156,7 @@ const RepsOnResults = (props) => {
)
: formatDates(
detailsObj.pinswg_finalcommentsduedate
),
)
}
)}
<br />{" "}
+4 -8
View File
@@ -10,7 +10,6 @@ import {
getPortalModuleDetails
} from "../../actions/services/caseService";
import data from "../../data/collections.json";
import { useRouter } from "next/router";
import xpath from "xpath";
@@ -775,9 +774,7 @@ export const updateLinks = (input) => {
return updated;
};
export const whichRepType = (props) => {
const router = useRouter();
const { locale } = router;
export const whichRepType = (props, locale) => {
let repType;
let whichBaseType =
props.currentView?.caseReference.repDetails.representationType ||
@@ -785,14 +782,13 @@ export const whichRepType = (props) => {
switch (whichBaseType) {
case "Statement":
repType = router.locale == "cy" ? "Datganiad" : "Statment";
repType = locale == "cy" ? "Datganiad" : "Statment";
break;
case "Questionnaire":
repType = router.locale == "cy" ? "Holiadur" : "Questionnaire";
repType = locale == "cy" ? "Holiadur" : "Questionnaire";
break;
case "Final comments":
repType =
router.locale == "cy" ? "Sylwadau terfynol" : "Final comments";
repType = locale == "cy" ? "Sylwadau terfynol" : "Final comments";
break;
default:
// code block
+468 -612
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -100,8 +100,8 @@
"@react-pdf/pdfkit": "3.1.0"
},
"devDependencies": {
"eslint": "^9.11.1",
"eslint-config-next": "^15.0.3",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.28",
"eslint-plugin-jsdoc": "^48.2.3",
"prisma": "^5.0.0"
}
+326 -446
View File
File diff suppressed because it is too large Load Diff