diff --git a/.prettierrc b/.prettierrc index 548cc94c4..192cad794 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,6 @@ { "tabWidth": 4, "bracketSameLine": true, - "printWidth": 100 + "printWidth": 100, + "trailingComma" : "es5" } \ No newline at end of file diff --git a/src/constants/tint-mapper.js b/src/constants/tint-mapper.js index bf8dbbf96..c290dd1db 100644 --- a/src/constants/tint-mapper.js +++ b/src/constants/tint-mapper.js @@ -89,7 +89,7 @@ export function getTintImage(glassLocation, colorString) { } const tintImageSource = tintMap[glassLocation.toLowerCase()].find( - (item) => item.name.toLowerCase() == colorString.toLowerCase(), + (item) => item.name.toLowerCase() == colorString.toLowerCase() ); return tintImageSource; diff --git a/src/digital-components/base-input-button/base-input-button.spec.js b/src/digital-components/base-input-button/base-input-button.spec.js index 464c79797..507c1ec59 100644 --- a/src/digital-components/base-input-button/base-input-button.spec.js +++ b/src/digital-components/base-input-button/base-input-button.spec.js @@ -524,7 +524,7 @@ describe("baseInputButton.vue", () => { // Assert expect(wrapper.vm.handleChange).toHaveBeenCalledWith(resultingValueToEmit); - }, + } ); describe("checkbox", () => { @@ -644,7 +644,7 @@ describe("baseInputButton.vue", () => { // Assert expect(wrapper.vm.valueToEmit).toEqual(["Hello", "Mello"]); expect(wrapper.vm.handleChange).toHaveBeenCalledWith(["Hello", "Mello"]); - }, + } ); }); @@ -672,7 +672,7 @@ describe("baseInputButton.vue", () => { // Assert expect(wrapper.vm.valueToEmit).toEqual("Bello"); expect(wrapper.vm.handleChange).toHaveBeenCalledWith("Bello"); - }, + } ); }); }); @@ -721,7 +721,7 @@ describe("baseInputButton.vue", () => { // Assert expect(wrapper.emitted()["update:modelValue"][0][0]).toEqual("HELLO WORLD"); - }, + } ); }); @@ -957,7 +957,7 @@ describe("baseInputButton.vue", () => { "Clicked", "Bello", true, - undefined, + undefined ); expect(wrapper.vm.setLastValuePushedToGa).toHaveBeenCalledWith("Bello"); }); @@ -1020,7 +1020,7 @@ describe("baseInputButton.vue", () => { const inputElement = wrapper.find("input"); expect(wrapper.vm.isChecked).toEqual(false); expect(inputElement.element.checked).toBe(false); - }, + } ); test("modelValue doesn't contain this button's value => checkbox isn't checked", async () => { @@ -1082,7 +1082,7 @@ describe("baseInputButton.vue", () => { const inputElement = wrapper.find("input"); expect(wrapper.vm.isChecked).toEqual(false); expect(inputElement.element.checked).toBe(false); - }, + } ); test("modelValue equals this button's value => radio button is checked", () => { diff --git a/src/digital-components/base-input-button/base-input-button.vue b/src/digital-components/base-input-button/base-input-button.vue index 4e4632884..e9b5e6411 100644 --- a/src/digital-components/base-input-button/base-input-button.vue +++ b/src/digital-components/base-input-button/base-input-button.vue @@ -134,7 +134,7 @@ export default { this.GaActions.CLICKED, value?.toString() ?? this.value?.toString(), true, - this.valueToLogType, + this.valueToLogType ); this.setLastValuePushedToGa(value ?? this.value); @@ -182,7 +182,7 @@ export default { const { handleChange, meta, errors } = useField( toRef(props, "groupName"), toRef(props, "validationRules"), - fieldOptions, + fieldOptions ); return { diff --git a/src/digital-components/button-question/button-question.spec.js b/src/digital-components/button-question/button-question.spec.js index c63a9fa02..3b7a4e80e 100644 --- a/src/digital-components/button-question/button-question.spec.js +++ b/src/digital-components/button-question/button-question.spec.js @@ -69,7 +69,7 @@ describe("buttonQuestion.vue", () => { // Arrange const wrapper = shallowMount( buttonQuestion, - setupMocks({ propsData: { groupName: "group-name" } }), + setupMocks({ propsData: { groupName: "group-name" } }) ); await wrapper.setProps({ answers: ["2022", "2021", "2020"], @@ -87,7 +87,7 @@ describe("buttonQuestion.vue", () => { test("is checkbox => should emit captured value", async () => { const wrapper = shallowMount( buttonQuestion, - setupMocks({ propsData: { groupName: "group-name" } }), + setupMocks({ propsData: { groupName: "group-name" } }) ); await wrapper.setProps({ answers: ["2022", "2021", "2020"], @@ -125,7 +125,7 @@ describe("buttonQuestion.vue", () => { buttonTypeString: "mockComponent", buttonTypeObject: mockComponent, }, - }), + }) ); // Act @@ -158,7 +158,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -184,7 +184,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -212,7 +212,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -231,7 +231,7 @@ describe("buttonQuestion.vue", () => { propsData: { answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -259,7 +259,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -285,7 +285,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -313,7 +313,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -332,7 +332,7 @@ describe("buttonQuestion.vue", () => { propsData: { answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -360,7 +360,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -386,7 +386,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -414,7 +414,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -433,7 +433,7 @@ describe("buttonQuestion.vue", () => { propsData: { answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -461,7 +461,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -487,7 +487,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -515,7 +515,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -534,7 +534,7 @@ describe("buttonQuestion.vue", () => { propsData: { answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -562,7 +562,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -588,7 +588,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -616,7 +616,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -635,7 +635,7 @@ describe("buttonQuestion.vue", () => { propsData: { answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -660,7 +660,7 @@ describe("buttonQuestion.vue", () => { answers: answerGroup, groupName: "this is my group name", }, - }), + }) ); // Act @@ -669,7 +669,7 @@ describe("buttonQuestion.vue", () => { // Assert expect(buttonsInfo[0].groupName).toEqual("this-is-my-group-name"); expect(buttonsInfo[1].groupName).toEqual("this-is-my-group-name"); - }, + } ); test.each(answers)( @@ -683,7 +683,7 @@ describe("buttonQuestion.vue", () => { answers: answerGroup, groupName: "this-is-my-group-name", }, - }), + }) ); // Act @@ -692,7 +692,7 @@ describe("buttonQuestion.vue", () => { // Assert expect(buttonsInfo[0].groupName).toEqual("this-is-my-group-name"); expect(buttonsInfo[1].groupName).toEqual("this-is-my-group-name"); - }, + } ); }); @@ -714,7 +714,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -741,7 +741,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -768,7 +768,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -797,7 +797,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -826,7 +826,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -855,7 +855,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -886,7 +886,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -906,7 +906,7 @@ describe("buttonQuestion.vue", () => { useTextForValue: true, answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -935,7 +935,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -962,7 +962,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -989,7 +989,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -1018,7 +1018,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -1047,7 +1047,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -1076,7 +1076,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -1107,7 +1107,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -1127,7 +1127,7 @@ describe("buttonQuestion.vue", () => { useTextForValue: false, answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -1145,7 +1145,7 @@ describe("buttonQuestion.vue", () => { function setupMocks(mountOptionsMockData = {}) { const defaultMountOptions = { route: { query: { fmgPage: "page-name" } } }; const baseMountOptions = getMountOptions( - Object.assign(defaultMountOptions, mountOptionsMockData), + Object.assign(defaultMountOptions, mountOptionsMockData) ); const allMountOptions = Object.assign(defaultMountOptions, baseMountOptions); diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 8bcb349af..b060167cb 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -309,7 +309,7 @@ export default { this.$route.query[queryStrings.FMG_PAGE], this.GaActions.DISPLAYED, eventLabel, - true, + true ); } }, diff --git a/src/digital-components/date-picker/date-picker.spec.js b/src/digital-components/date-picker/date-picker.spec.js index c9c19b0a6..e4416d37a 100644 --- a/src/digital-components/date-picker/date-picker.spec.js +++ b/src/digital-components/date-picker/date-picker.spec.js @@ -442,7 +442,7 @@ describe("date-picker.vue", () => { "2023-07-24", "2023-08-19", "Inshop", - "006747", + "006747" ); // Assert @@ -903,7 +903,7 @@ describe("date-picker.vue", () => { // Assert expect( testResult[0].weekStartDate <= todayString && - todayString <= testResult[0].weekEndDate, + todayString <= testResult[0].weekEndDate ).toBe(true); wrapper.unmount(); @@ -938,7 +938,7 @@ describe("date-picker.vue", () => { const testResult = wrapper.vm.getInitialViewWeeks( "2023-07-31", 5, - mockPreSelectedDate, + mockPreSelectedDate ); // Assert @@ -956,7 +956,7 @@ describe("date-picker.vue", () => { const testResult = wrapper.vm.getInitialViewWeeks( "2023-07-31", 5, - mockPreSelectedDate, + mockPreSelectedDate ); // Assert @@ -1028,7 +1028,7 @@ describe("date-picker.vue", () => { // Assert expect(wrapper.vm.updateSelectableDates).toHaveBeenCalledWith( "2023-12-31", - "2023-12-31", + "2023-12-31" ); expect(wrapper.vm.scrollToElement).toHaveBeenCalledWith("December-2023"); @@ -1054,7 +1054,7 @@ describe("date-picker.vue", () => { // Assert expect(wrapper.vm.updateSelectableDates).toHaveBeenCalledWith( "2024-01-01", - "2024-01-31", + "2024-01-31" ); expect(wrapper.vm.scrollToElement).toHaveBeenCalledWith("January-2024"); @@ -1083,7 +1083,7 @@ describe("date-picker.vue", () => { // Assert expect(wrapper.vm.updateSelectableDates).toHaveBeenCalledWith( "2024-01-01", - "2024-01-31", + "2024-01-31" ); expect(wrapper.vm.scrollToElement).toHaveBeenCalledWith("January-2024"); @@ -1339,7 +1339,7 @@ function setupMocks(mountOptionsMockData = {}) { }, }; const mountOptions = getMountOptions( - Object.assign(initialMountOptionsMockData, mountOptionsMockData), + Object.assign(initialMountOptionsMockData, mountOptionsMockData) ); const wrapper = shallowMount(datePicker, mountOptions); diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index bb95dfc8c..c345a1ce3 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -288,7 +288,7 @@ export default { for (let j = 0; j < 7; j++) { const newDate = convertDateStringToDate( - weeks[splitWeekIndex].weekStartDate, + weeks[splitWeekIndex].weekStartDate ); newDate.setDate(newDate.getDate() + j); if (newDate.getDate() === 1) switchToWeek2 = true; @@ -349,7 +349,7 @@ export default { const initialViewWeeks = this.getInitialViewWeeks( todayDateString, config.initialViewRowsToShow, - config.preSelectedDate, + config.preSelectedDate ); const initialViewStartDate = todayDateString; const initialViewEndDate = initialViewWeeks[initialViewWeeks.length - 1].weekEndDate; @@ -379,7 +379,7 @@ export default { initialViewStartDate, initialViewEndDate, store.getters.order.serviceLocation.appointmentType, - store.getters.order.serviceLocation.provider.providerNumber, + store.getters.order.serviceLocation.provider.providerNumber ); resolve(response); }); @@ -442,7 +442,7 @@ export default { this.$nextTick(() => { //Advance to month const monthToShow = this.months.find((month) => - month.monthClass.includes("month-preselected"), + month.monthClass.includes("month-preselected") ); if ( monthToShow.monthClass.includes("month-preselected") && @@ -604,7 +604,7 @@ export default { if (this.hideSomeDaysForInitialView) { monthToShow = this.months.find( ({ isMonthThatHidesSomeDaysForInitialView }) => - isMonthThatHidesSomeDaysForInitialView, + isMonthThatHidesSomeDaysForInitialView ); // find the first day-hidden to become the next api call start date monthStartDateNum = @@ -613,13 +613,13 @@ export default { } else { if (this.calendarViewDirection === "future") { monthToShow = this.months.find((month) => - month.monthClass.includes("month-hidden"), + month.monthClass.includes("month-hidden") ); } if (this.calendarViewDirection === "past") { // TODO: UPDATE THIS WITH CORRECT PAST LOOKING LOGIC monthToShow = this.months.find((month) => - month.monthClass.includes("month-hidden"), + month.monthClass.includes("month-hidden") ); } } @@ -627,7 +627,7 @@ export default { // make new API call with this month's start and end dates await this.updateSelectableDates( monthToShow.dates[monthStartDateNum].inputValue, - monthToShow.dates[monthToShow.dates.length - 1].inputValue, + monthToShow.dates[monthToShow.dates.length - 1].inputValue ); this.isLoading = false; this.hideSomeDaysForInitialView = false; // if hid days on initial partial view, this will reveal those days @@ -643,12 +643,12 @@ export default { monthStart, monthEnd, this.$store.getters.order.serviceLocation.appointmentType, - this.$store.getters.order.serviceLocation.provider.providerNumber, + this.$store.getters.order.serviceLocation.provider.providerNumber ); moreSelectableDates.days.forEach((selectableDate) => { const index = this.selectableDatesData.findIndex( - (dateObj) => dateObj.date === selectableDate.date, + (dateObj) => dateObj.date === selectableDate.date ); if (index === -1) this.selectableDatesData.push(selectableDate); this.months.forEach((month) => { diff --git a/src/digital-components/dropdown-question/dropdown-question.vue b/src/digital-components/dropdown-question/dropdown-question.vue index bc7ea832e..70bf6c90c 100644 --- a/src/digital-components/dropdown-question/dropdown-question.vue +++ b/src/digital-components/dropdown-question/dropdown-question.vue @@ -88,7 +88,7 @@ export default { const { errorMessage, handleBlur, handleChange, meta, errors } = useField( dropdownId, props.validationRules, - fieldOptions, + fieldOptions ); return { diff --git a/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.spec.js b/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.spec.js index fcc089f28..f212d8ec3 100644 --- a/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.spec.js +++ b/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.spec.js @@ -12,7 +12,7 @@ describe("modal-button-main.vue", () => { propsData: { isPrimary: true, }, - }), + }) ); const button = wrapper.find("button"); @@ -28,7 +28,7 @@ describe("modal-button-main.vue", () => { propsData: { isDisabled: true, }, - }), + }) ); const button = wrapper.find("button"); @@ -45,7 +45,7 @@ describe("modal-button-main.vue", () => { loaderColor: "blue", loaderEnabled: true, }, - }), + }) ); // Act @@ -66,7 +66,7 @@ describe("modal-button-main.vue", () => { loaderPosition: "right", loaderEnabled: true, }, - }), + }) ); // Act @@ -87,7 +87,7 @@ describe("modal-button-main.vue", () => { loaderPosition: "right", loaderEnabled: true, }, - }), + }) ); wrapper.setData({ @@ -112,7 +112,7 @@ describe("modal-button-main.vue", () => { loaderPosition: "right", loaderEnabled: true, }, - }), + }) ); wrapper.setData({ @@ -137,7 +137,7 @@ describe("modal-button-main.vue", () => { loaderEnabled: true, isDisabled: false, }, - }), + }) ); const buttonElement = wrapper.find("button"); @@ -161,7 +161,7 @@ describe("modal-button-main.vue", () => { loaderEnabled: true, isDisabled: true, }, - }), + }) ); const buttonElement = wrapper.find("button"); @@ -179,7 +179,7 @@ describe("modal-button-main.vue", () => { function setupMocks(mountOptionsMockData = {}) { const defaultMountOptions = { route: { query: { fmgPage: "page-name" } } }; const baseMountOptions = getMountOptions( - Object.assign(defaultMountOptions, mountOptionsMockData), + Object.assign(defaultMountOptions, mountOptionsMockData) ); const allMountOptions = Object.assign(defaultMountOptions, baseMountOptions); diff --git a/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.vue b/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.vue index 72ee0b5a4..687ae6858 100644 --- a/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.vue +++ b/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.vue @@ -45,7 +45,7 @@ export default { this.$route.query[this.queryStrings.FMG_PAGE], this.GaActions.CLICKED, this.buttonText, - true, + true ); if (!this.isDisabled) { this.isLoaderDisplayed = true; diff --git a/src/digital-components/phone-number-question/phone-number-question.spec.js b/src/digital-components/phone-number-question/phone-number-question.spec.js index 5671f80ff..78ff60bf7 100644 --- a/src/digital-components/phone-number-question/phone-number-question.spec.js +++ b/src/digital-components/phone-number-question/phone-number-question.spec.js @@ -58,7 +58,7 @@ describe("phone-number-question.vue", () => { // Assert expect(wrapper.vm.validationRulesForTextBoxQuestion).toEqual( - "outsideValidation|phone-number-format", + "outsideValidation|phone-number-format" ); }); }); diff --git a/src/digital-components/phone-number-question/phone-number-question.vue b/src/digital-components/phone-number-question/phone-number-question.vue index 8c8c61d50..86dfc3f04 100644 --- a/src/digital-components/phone-number-question/phone-number-question.vue +++ b/src/digital-components/phone-number-question/phone-number-question.vue @@ -23,7 +23,7 @@ import { defineRule } from "vee-validate"; // Validation defineRule( "phone-number-format", - regex(/^(?=(?:.*\d){10})(?=(?:.*-){2})[\d-]{12}$/, errorMessages.PHONE_FORMAT), + regex(/^(?=(?:.*\d){10})(?=(?:.*-){2})[\d-]{12}$/, errorMessages.PHONE_FORMAT) ); export default { diff --git a/src/digital-components/question-chain/question-chain.spec.js b/src/digital-components/question-chain/question-chain.spec.js index 2048cb813..d516afc03 100644 --- a/src/digital-components/question-chain/question-chain.spec.js +++ b/src/digital-components/question-chain/question-chain.spec.js @@ -8,7 +8,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); describe("Question Chain component", () => { diff --git a/src/digital-components/textbox-question/textbox-question.spec.js b/src/digital-components/textbox-question/textbox-question.spec.js index 3ca0901ec..be33230c2 100644 --- a/src/digital-components/textbox-question/textbox-question.spec.js +++ b/src/digital-components/textbox-question/textbox-question.spec.js @@ -200,7 +200,7 @@ describe("textboxQuestion.vue", () => { resolve({ data: [responseValue], }); - }), + }) ); const wrapper = shallowMount(textboxQuestion, { @@ -248,7 +248,7 @@ describe("textboxQuestion.vue", () => { resolve({ data: [responseValue], }); - }), + }) ); const wrapper = shallowMount(textboxQuestion, { @@ -292,7 +292,7 @@ describe("textboxQuestion.vue", () => { () => new Promise((resolve, reject) => { reject({}); - }), + }) ); const wrapper = shallowMount(textboxQuestion, { diff --git a/src/digital-components/textbox-question/textbox-question.vue b/src/digital-components/textbox-question/textbox-question.vue index fe89e8ae3..15fb89a8b 100644 --- a/src/digital-components/textbox-question/textbox-question.vue +++ b/src/digital-components/textbox-question/textbox-question.vue @@ -160,7 +160,7 @@ export default { const { errorMessage, handleBlur, handleChange, meta, validate, errors } = useField( inputId, props.validationRules, - fieldOptions, + fieldOptions ); return { diff --git a/src/fmg-components/address-questions/address-questions.spec.js b/src/fmg-components/address-questions/address-questions.spec.js index 6f2e5b0b8..5267bb89c 100644 --- a/src/fmg-components/address-questions/address-questions.spec.js +++ b/src/fmg-components/address-questions/address-questions.spec.js @@ -283,7 +283,7 @@ describe("address-questions.vue", () => { // Act autocompleteElement.dispatchEvent( - new CustomEvent("place_changed", { detail: selectedPlace }), + new CustomEvent("place_changed", { detail: selectedPlace }) ); // Assert diff --git a/src/fmg-components/address-questions/address-questions.vue b/src/fmg-components/address-questions/address-questions.vue index 95f77d5d5..7acd0f4f0 100644 --- a/src/fmg-components/address-questions/address-questions.vue +++ b/src/fmg-components/address-questions/address-questions.vue @@ -221,7 +221,7 @@ export default { // Load the Google Places Autocomplete script const apiKey = applicationConfig.GOOGLE_PLACES_API_KEY; this.$loadScript( - `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places&callback=Function.prototype`, + `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places&callback=Function.prototype` ).then(() => { // When loaded, trigger the setup this.initializeAutocomplete(); @@ -240,7 +240,7 @@ export default { this.autocompleteListener = window.google.maps.event.addListener( this.autocomplete, "place_changed", - this.fillInAddress, + this.fillInAddress ); // When the Street Address textbox receives input for the first time, @@ -258,7 +258,7 @@ export default { streetAddressField.appendChild(autocompleteResultsContainer); } }, - { once: true }, + { once: true } ); this.addressField1.addEventListener("keydown", (e) => { @@ -274,7 +274,7 @@ export default { }); const addressFields = document.querySelectorAll( - ".address-questions input, .address-questions select", + ".address-questions input, .address-questions select" ); for (let addressField of addressFields) { @@ -303,7 +303,7 @@ export default { }, findAddressComponentByType(place, componentName, componentLength) { const component = place.address_components.find((component) => - component.types.find((type) => type == componentName), + component.types.find((type) => type == componentName) ); if (component) { return component[componentLength] ?? ""; @@ -332,7 +332,7 @@ export default { const streetNumber = this.findAddressComponentByType( place, "street_number", - "long_name", + "long_name" ); const route = this.findAddressComponentByType(place, "route", "short_name"); const city = this.findAddressComponentByType(place, "locality", "long_name"); @@ -345,7 +345,7 @@ export default { state = this.findAddressComponentByType( place, "administrative_area_level_1", - "short_name", + "short_name" ); } @@ -354,7 +354,7 @@ export default { zipCode = this.findAddressComponentByType( place, "postal_code", - "long_name", + "long_name" ); } @@ -399,7 +399,7 @@ export default { self.displayVerificationWarning = true; self.fillInAddress(results[0]); } - }, + } ); } else { this.matchFound = false; @@ -475,7 +475,7 @@ export default { this.matchFound = null; this.$nextTick(); }, - { deep: true, flush: "post" }, + { deep: true, flush: "post" } ); } }, diff --git a/src/fmg-components/cart/cart.spec.js b/src/fmg-components/cart/cart.spec.js index 3f30746ef..10207c8bb 100644 --- a/src/fmg-components/cart/cart.spec.js +++ b/src/fmg-components/cart/cart.spec.js @@ -61,7 +61,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.frontWipersCartItem, + (cartItem) => cartItem == wrapper.vm.frontWipersCartItem ) >= 0; expect(found).toBe(true); }); @@ -113,7 +113,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.rearWipersCartItem, + (cartItem) => cartItem == wrapper.vm.rearWipersCartItem ) >= 0; expect(found).toBe(true); }); @@ -156,7 +156,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.rainDefenseCartItem, + (cartItem) => cartItem == wrapper.vm.rainDefenseCartItem ) >= 0; expect(found).toBe(true); }); @@ -258,7 +258,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.recycleFeeCartItem, + (cartItem) => cartItem == wrapper.vm.recycleFeeCartItem ) >= 0; expect(found).toBe(true); }); @@ -301,7 +301,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.mobileFeeCartItem, + (cartItem) => cartItem == wrapper.vm.mobileFeeCartItem ) >= 0; expect(found).toBe(true); }); @@ -344,7 +344,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.servicePackageDiscountCartItem, + (cartItem) => cartItem == wrapper.vm.servicePackageDiscountCartItem ) >= 0; expect(found).toBe(true); }); @@ -389,7 +389,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.otherSupportingItemsCartItem, + (cartItem) => cartItem == wrapper.vm.otherSupportingItemsCartItem ) >= 0; expect(found).toBe(true); }); diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index bfc0d346b..a1ef90c50 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -25,7 +25,7 @@ {{ getLineItemAmount( deductibleLineItem.subTotal, - showCoverageAsPending, + showCoverageAsPending ) }} @@ -238,7 +238,7 @@ export default { this.glassToReplace, this.availableLineItems, this.isRepair, - packageName, + packageName ); let vapsCartItemsForSelectedPackage = []; @@ -280,7 +280,7 @@ export default { removeItem(cartItemType, category) { this.lineItems[category] = this.lineItems[category].filter( - (lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType, + (lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType ); }, getPromoCodeList() { @@ -401,7 +401,7 @@ export default { servicePackageTitleWidget() { const servicePackageNames = this.getCmsContent( this.servicePackageOptionsCmsName, - "Answers", + "Answers" ); if (!servicePackageNames) { @@ -409,7 +409,7 @@ export default { } const currentPackage = servicePackageNames.find( - (entry) => entry.Name === this.packageLevel, + (entry) => entry.Name === this.packageLevel ); return currentPackage.SubWidgetName; @@ -419,7 +419,7 @@ export default { this.glassToReplace, this.availableLineItems, this.isRepair, - this.vaps, + this.vaps ); return tier; @@ -429,7 +429,7 @@ export default { if (!this.showCoverageAsVerified && !this.showCoverageAsPending) { packagePrice = baseMixin.methods.getTierOnePackagePrice( - baseMixin.methods.filterOutFees(this.availableLineItems), + baseMixin.methods.filterOutFees(this.availableLineItems) ); } @@ -518,7 +518,7 @@ export default { let cartItem = null; const frontWiperLineItems = this.vaps.filter( - (vapsLineItem) => vapsLineItem.partType == partTypeStrings.FRONT_WIPER, + (vapsLineItem) => vapsLineItem.partType == partTypeStrings.FRONT_WIPER ); if (frontWiperLineItems.length > 0) { @@ -532,7 +532,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.FRONT_WIPERS, + cartItemTypes.FRONT_WIPERS ), }; @@ -558,7 +558,7 @@ export default { let cartItem = null; const rearWiperLineItems = this.vaps.filter( - (vapsLineItem) => vapsLineItem.partType == partTypeStrings.REAR_WIPER, + (vapsLineItem) => vapsLineItem.partType == partTypeStrings.REAR_WIPER ); if (rearWiperLineItems.length > 0) { @@ -572,7 +572,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.REAR_WIPERS, + cartItemTypes.REAR_WIPERS ), }; @@ -598,7 +598,7 @@ export default { let cartItem = null; const rainDefenseLineItem = this.vaps.find( - (vapsLineItem) => vapsLineItem.partType == partTypeStrings.RAIN_DEFENSE, + (vapsLineItem) => vapsLineItem.partType == partTypeStrings.RAIN_DEFENSE ); if (rainDefenseLineItem) { @@ -612,7 +612,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.RAIN_DEFENSE, + cartItemTypes.RAIN_DEFENSE ), }; @@ -647,7 +647,7 @@ export default { salesTax: lineItem.salesTax ?? 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.GLASS_PARTS, + cartItemTypes.GLASS_PARTS ), }; @@ -678,7 +678,7 @@ export default { let cartItem = null; let recycleFeeLineItem = this.supportingItems.find( - (supportingItem) => supportingItem.partType == partTypeStrings.REPLACE_FEE, + (supportingItem) => supportingItem.partType == partTypeStrings.REPLACE_FEE ); if (!recycleFeeLineItem && this.requiresRecycleFeeCartItem) { @@ -703,7 +703,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.REPLACE_FEE, + cartItemTypes.REPLACE_FEE ), }; @@ -729,7 +729,7 @@ export default { const suppliesRepairLineItem = this.supportingItems.find( (supportingItem) => supportingItem.partType == partTypeStrings.REPAIR_FEE && - supportingItem.partNumber != "WSREPAIR", + supportingItem.partNumber != "WSREPAIR" ); if (suppliesRepairLineItem) { @@ -743,7 +743,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.SUPPLIES_REPAIR, + cartItemTypes.SUPPLIES_REPAIR ), }; @@ -766,7 +766,7 @@ export default { mobileFeeCartItem() { let cartItem = null; const mobileFeeLineItem = this.supportingItems.find( - (lineItem) => lineItem.partType == partTypeStrings.MOBILE_FEE, + (lineItem) => lineItem.partType == partTypeStrings.MOBILE_FEE ); if (mobileFeeLineItem) { @@ -780,7 +780,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.MOBILE_FEE, + cartItemTypes.MOBILE_FEE ), }; mobileFeeLineItem.cartItemType = cartItem.cartItemType; @@ -800,7 +800,7 @@ export default { let cartItem = null; const servicePackageDiscountLineItem = this.supportingItems.find( - (lineItem) => lineItem.partType == partTypeStrings.SERVICE_PACKAGE_DISCOUNT, + (lineItem) => lineItem.partType == partTypeStrings.SERVICE_PACKAGE_DISCOUNT ); if (servicePackageDiscountLineItem) { @@ -808,7 +808,7 @@ export default { name: this.servicePackageDiscountCartItemName + Math.abs( - baseMixin.methods.getTotalLineItemPrice(servicePackageDiscountLineItem), + baseMixin.methods.getTotalLineItemPrice(servicePackageDiscountLineItem) ), category: cartItemCategories.SERVICE_PACKAGE_DISCOUNT, cartItemType: cartItemTypes.SERVICE_PACKAGE_DISCOUNT, @@ -854,7 +854,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.SUPPORTING_ITEMS, + cartItemTypes.SUPPORTING_ITEMS ), }; @@ -880,7 +880,7 @@ export default { let cartItem = null; const premiumAppointmentDiscountLineItem = this.supportingItems.find( - (lineItem) => lineItem.partType == partTypeStrings.EARLY_BIRD, + (lineItem) => lineItem.partType == partTypeStrings.EARLY_BIRD ); if (premiumAppointmentDiscountLineItem) { @@ -894,7 +894,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.EARLY_BIRD, + cartItemTypes.EARLY_BIRD ), }; @@ -919,16 +919,14 @@ export default { // get unique promo codes const uniquePromoCodes = [ ...new Set( - this.promos.map((promo) => - getPromoCodeWithoutBundleIdentifier(promo.promoCode), - ), + this.promos.map((promo) => getPromoCodeWithoutBundleIdentifier(promo.promoCode)) ), ]; uniquePromoCodes.forEach((promoCode) => { // get the codes with the prefix from the promo array const promoLineItems = this.promos.filter( - (promo) => getPromoCodeWithoutBundleIdentifier(promo.promoCode) == promoCode, + (promo) => getPromoCodeWithoutBundleIdentifier(promo.promoCode) == promoCode ); // Create a cart item for each promo diff --git a/src/fmg-components/funnel-header/funnel-header.vue b/src/fmg-components/funnel-header/funnel-header.vue index c2bf64e08..8de05c3c1 100644 --- a/src/fmg-components/funnel-header/funnel-header.vue +++ b/src/fmg-components/funnel-header/funnel-header.vue @@ -65,7 +65,7 @@ export default { // Check if alert event is on the bus const alertEvent = eventBus.readAndPopEventFromBus( globalEvents.Categories.GLOBAL_ALERT, - globalEvents.SubCategories.PAGE_NOT_FOUND, + globalEvents.SubCategories.PAGE_NOT_FOUND ); // If alert event is on the bus, then display the alert if (alertEvent !== undefined) { @@ -76,7 +76,7 @@ export default { //Uknown alerts most likely were added by a failed api call in global-methods const unknownAlertEvent = eventBus.readAndPopEventFromBus( globalEvents.Categories.GLOBAL_ALERT, - globalEvents.SubCategories.UNKNOWN_ERROR, + globalEvents.SubCategories.UNKNOWN_ERROR ); if (unknownAlertEvent !== undefined) { diff --git a/src/fmg-components/loading-modal/loading-modal.spec.js b/src/fmg-components/loading-modal/loading-modal.spec.js index 1fd76d731..36a6d6e33 100644 --- a/src/fmg-components/loading-modal/loading-modal.spec.js +++ b/src/fmg-components/loading-modal/loading-modal.spec.js @@ -8,7 +8,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); jest.mock("@/assets/img/loader.gif", () => "loader.gif"); diff --git a/src/fmg-components/promo-modal-question/promo-modal-question.spec.js b/src/fmg-components/promo-modal-question/promo-modal-question.spec.js index ad3719629..435a53277 100644 --- a/src/fmg-components/promo-modal-question/promo-modal-question.spec.js +++ b/src/fmg-components/promo-modal-question/promo-modal-question.spec.js @@ -17,7 +17,7 @@ jest.mock("@/mixins/base-mixin", () => ({ dispatchStoreActionWithLogging: jest.fn( (action, { promoCode, addableVaps }, pageNameToLog, someBool) => { return mockReturnsForStoreActions[action]; - }, + } ), }, })); @@ -171,7 +171,7 @@ describe("promo-modal-question.vue", () => { addableVaps, }, pageNameToLog, - false, + false ); // Assert @@ -221,7 +221,7 @@ describe("promo-modal-question.vue", () => { "payment-method", - false, + false ); // Assert @@ -284,7 +284,7 @@ describe("promo-modal-question.vue", () => { cartItemCategories.PROMOS ].filter( (lineItemsToKeep) => - getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo, + getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo )); //Assert diff --git a/src/fmg-components/promo-modal-question/promo-modal-question.vue b/src/fmg-components/promo-modal-question/promo-modal-question.vue index 4cb5504e5..cf5e52f21 100644 --- a/src/fmg-components/promo-modal-question/promo-modal-question.vue +++ b/src/fmg-components/promo-modal-question/promo-modal-question.vue @@ -156,7 +156,7 @@ export default { }, getPromoCodeList() { const promosToDisplay = getPromoCodesFromPromoObjectsWithoutDuplicates( - this.lineItems.promos, + this.lineItems.promos ); return promosToDisplay; }, @@ -198,7 +198,7 @@ export default { lineItems, addableVaps, useDefaultCashParentAccount, - pageNameToLog = null, + pageNameToLog = null ) { const pageName = pageNameToLog ?? this.$options?.name; const promoValidationResponse = await baseMixin.methods.dispatchStoreActionWithLogging( @@ -210,7 +210,7 @@ export default { useDefaultCashParentAccount: useDefaultCashParentAccount, }, pageName, - false, + false ); return { @@ -225,7 +225,7 @@ export default { cartItemCategories.PROMOS ].filter( (lineItemsToKeep) => - getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo, + getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo ); }, getErrorMessage(error, additionalInfo) { @@ -240,27 +240,27 @@ export default { (match, group) => group === "NEW" ? this.promoCode.toUpperCase() - : this.getConflictingPromoCode(additionalInfo), + : this.getConflictingPromoCode(additionalInfo) )), (this.displayStackingPromoAlert = true)); case promoErrorCodes.INVALID_PROMO_ON_ORDER: if (additionalInfo.some((x) => x.toUpperCase() === "APPOINTMENT_TYPE")) { this.errorMessage = this.InShopPromoText?.replaceAll( "{custom:INSHOPPROMOCODE}", - this.promoCode.toUpperCase(), + this.promoCode.toUpperCase() ); return (this.displayInShopPromoAlert = true); } else { this.errorMessage = this.PromoText?.replaceAll( "{custom:PROMOCODE}", - this.promoCode.toUpperCase(), + this.promoCode.toUpperCase() ); return (this.displayInvalidPromoAlert = true); } default: this.errorMessage = this.PromoText?.replaceAll( "{custom:PROMOCODE}", - this.promoCode.toUpperCase(), + this.promoCode.toUpperCase() ); return (this.displayInvalidPromoAlert = true); } @@ -274,7 +274,7 @@ export default { this.lineItems, this.addableVaps, this.useDefaultCashParentAccount, - this.pageName, + this.pageName ); if (promoCodeData.isValid) { if (this.taxPromos) { @@ -297,24 +297,24 @@ export default { pricedLineItems: pricedLineItemsToTax, }, "payment-method", - false, + false ); // Match all line items to the line items as they are in the store // and rebuild the original structure. this.lineItems = mapTaxedLineItemsToStoreFormat( taxedLineItems, - this.lineItems, + this.lineItems ); const taxedVaps = mapTaxedLineItemsToStoreFormat( taxedLineItems, - this.addableVaps, + this.addableVaps ); const getVaps = getVapsThatNeedToBeAddedToSatisfyPromos( promoCodeData.promoCode, taxedVaps, - this.lineItems, + this.lineItems ); this.lineItems.vaps?.push(...getVaps); diff --git a/src/fmg-components/vehicle-banner/vehicle-banner.spec.js b/src/fmg-components/vehicle-banner/vehicle-banner.spec.js index b2688c41c..1a9222299 100644 --- a/src/fmg-components/vehicle-banner/vehicle-banner.spec.js +++ b/src/fmg-components/vehicle-banner/vehicle-banner.spec.js @@ -9,7 +9,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); describe("vehicleBanner", () => { @@ -84,7 +84,7 @@ describe("vehicleBanner", () => { expect(store.getters.vehicle.category).toEqual(category); expect(wrapper.find("img").attributes("class")).toContain("vehicle-image"); wrapper.unmount(); - }, + } ); }); diff --git a/src/global-methods.js b/src/global-methods.js index e56f1ffbf..9426acede 100644 --- a/src/global-methods.js +++ b/src/global-methods.js @@ -43,7 +43,7 @@ axios.interceptors.response.use( } return Promise.reject(rejectionError); - }, + } ); export default { @@ -82,7 +82,7 @@ export default { GaCategories.API_RESPONSE, `${pageNameToLog}_${endpointWithoutParams}`, `${GaLabels.SUCCESS}${additionalEventData}`, - true, + true ); } @@ -94,7 +94,7 @@ export default { GaCategories.API_RESPONSE, GaActions.RESULT, `${GaLabels.ERROR}_${endpoint}`, - true, + true ); } @@ -106,12 +106,12 @@ export default { // when a service doesn't return an object global.$logger.logError( `${method}: ${endpoint}: ${error.message}`, - error.response, + error.response ); } return reject(error.response); - }, + } ); }); }, @@ -138,7 +138,7 @@ export default { }, (error) => { return reject(error.response); - }, + } ); }); }, diff --git a/src/helpers/add-to-calendar-helper.js b/src/helpers/add-to-calendar-helper.js index 4c43cb8a8..93a5e7c18 100644 --- a/src/helpers/add-to-calendar-helper.js +++ b/src/helpers/add-to-calendar-helper.js @@ -47,7 +47,7 @@ export function getCalendarFile(calFile) { '
' + "" + ToCalendarFileString(calFile.Body) + - "