Merge pull request #1068 from Safelite/feature/digital/joshdass/ESLint

Initial Setup of ESLint on latest version and new config type
This commit is contained in:
Josh Dassinger 2026-02-13 09:22:16 -06:00 committed by GitHub
commit 63e2f36c19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
104 changed files with 3837 additions and 4920 deletions

View file

@ -1,59 +0,0 @@
module.exports = {
env: {
browser: true,
jest: true
},
parserOptions: {
ecmaVersion: 'latest'
},
extends: [
'eslint-config-airbnb-base',
'plugin:vue/vue3-recommended',
'plugin:jsdoc/recommended'
],
rules: {
'linebreak-style': 'off',
'vue/component-definition-name-casing': ['warn', 'kebab-case'],
'vue/require-default-prop': 'off',
'vue/attribute-hyphenation': ['warn', 'never'],
'vue/v-on-event-hyphenation': ['warn', 'never'],
'object-curly-newline': ['error', { consistent: true }],
'function-paren-newline': ['error', 'multiline'],
'operator-linebreak': ['error', 'before', { overrides: { '=': 'after' } }],
'implicit-arrow-linebreak': ['off'],
'comma-dangle': ['error', 'never'],
indent: ['error', 4, { SwitchCase: 1 }],
'max-len': ['error', { code: 160 }],
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'vue/html-indent': 'off',
'vue/html-closing-bracket-newline': ['error', {
singleline: 'never',
multiline: 'never'
}],
'jsdoc/check-tag-names': ['error', {
definedTags: ['store', 'endpoint', 'category', 'subcategory', 'remarks']
}],
'jsdoc/require-jsdoc': 0,
'vue/html-self-closing': ['error', {
html: {
void: 'any',
normal: 'any',
component: 'any'
},
svg: 'always',
math: 'always'
}],
'import/extensions': ['error', 'always', { js: 'ignorePackages' }],
'no-param-reassign': ['error', { props: true, ignorePropertyModificationsFor: ['item'] }],
'no-restricted-syntax': ['off', 'ForOfStatement'],
'no-return-await': 'off'
},
settings: {
'import/resolver': {
alias: {
map: [['@', './src/']],
extensions: ['.js', '.vue']
}
}
}
};

149
eslint.config.js Normal file
View file

@ -0,0 +1,149 @@
import { globalIgnores } from 'eslint/config';
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript';
import pluginVue from 'eslint-plugin-vue';
// import pluginVitest from '@vitest/eslint-plugin';
import js from '@eslint/js';
import globals from 'globals';
import stylistic from '@stylistic/eslint-plugin';
import jsdoc from 'eslint-plugin-jsdoc';
export default defineConfigWithVueTs(
{
name: 'app/files-to-lint',
files: ['**/*.{vue,ts,js,mts,tsx}'],
},
js.configs.recommended,
jsdoc.configs['flat/recommended-mixed'],
// Add @stylistic configuration
stylistic.configs.customize({
indent: 4,
quotes: 'single',
semi: true,
// Add any other stylistic preferences here
}),
...pluginVue.configs['flat/essential'],
vueTsConfigs.recommended,
{
name: 'app/global-rules',
files: ['**/*.{js,ts,vue}'],
rules: {
'eqeqeq': ['error', 'smart'],
'no-nested-ternary': 'error',
'no-param-reassign': 'error',
'jsdoc/require-jsdoc': 'off',
'@stylistic/comma-dangle': 'off',
'@stylistic/max-len': ['error', {
code: 160,
tabWidth: 4,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true
}],
'vue/max-len': ['error', {
code: 160,
template: 160,
tabWidth: 4,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreHTMLTextContents: false
}],
}
},
{
name: 'app/custom-vue-rules',
files: ['**/*.vue'],
rules: {
'vue/block-lang': ['error', {
script: {
lang: ['js', 'ts'],
allowNoLang: true // Still allow <script> without a lang tag
},
style: {
lang: 'scss',
allowNoLang: false // Disallow <style> without lang="scss"
}
}]
}
},
{
name: 'app/custom-js-rules',
files: ['**/*.{js,ts}'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.vitest,
...globals.vue,
...globals.jest
}
}
},
// Additional test globals (object) — applies only to test files
// {
// files: ['**/*.spec.*', '**/*.test.*', '**/unit-test-helper.js'],
// ...pluginVitest.configs.recommended,
// },
{
name: 'app/temp-rules',
rules: {
// Temp rules until we make a pass at fixing all of them.
'@stylistic/arrow-parens': 'off',
'@stylistic/brace-style': 'off',
'@stylistic/eol-last': 'off',
'@stylistic/indent': 'off',
'@stylistic/indent-binary-ops': 'off',
'@stylistic/max-len': 'off',
'@stylistic/max-statements-per-line': 'off',
'@stylistic/multiline-ternary': 'off',
'@stylistic/no-trailing-spaces': 'off',
'@stylistic/object-curly-spacing': 'off',
'@stylistic/operator-linebreak': 'off',
'@stylistic/quote-props': 'off',
'@stylistic/quotes': 'off',
'@stylistic/semi': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'jsdoc/reject-any-type': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/require-param-type': 'off',
'jsdoc/require-returns-description': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/require-returns-type': 'off',
'jsdoc/ts-no-empty-object-type': 'off',
'no-case-declarations': 'off',
'no-constant-binary-expression': 'off',
'no-dupe-keys': 'off',
'no-import-assign': 'off',
'no-shadow': 'off',
'vitest/no-conditional-expect': 'off',
'vitest/no-identical-title': 'off',
'vitest/valid-expect': 'off',
'vitest/valid-expect-in-promise': 'off',
'vitest/valid-title': 'off',
'vue/max-len': 'off',
'vue/multi-word-component-names': 'off',
'vue/no-reserved-component-names': 'off',
'vue/no-side-effects-in-computed-properties': 'off',
'@typescript-eslint/no-require-imports': 'off',
'vitest/no-commented-out-tests': 'off',
'vitest/no-focused-tests': 'off',
'no-undef': 'off',
'vue/require-toggle-inside-transition': 'off',
'vue/no-dupe-keys': 'off',
'@typescript-eslint/no-this-alias': 'off',
'vitest/expect-expect': 'off',
'no-param-reassign': 'off',
}
},
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**', 'playwright-tests', '**/*.snap']),
);

8196
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -14,7 +14,10 @@
"test:unit": "vue-cli-service test:unit --coverage --ci --colors", "test:unit": "vue-cli-service test:unit --coverage --ci --colors",
"test:unit:coverage": "vue-cli-service test:unit --coverage --ci --colors", "test:unit:coverage": "vue-cli-service test:unit --coverage --ci --colors",
"test:unit:lite": "vue-cli-service test:unit --ci", "test:unit:lite": "vue-cli-service test:unit --ci",
"test:playwright": "playwright test --config=playwright-tests/playwright.config.ts" "test:playwright": "playwright test --config=playwright-tests/playwright.config.ts",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"lint:inspect": "eslint --inspect-config"
}, },
"dependencies": { "dependencies": {
"axios": "^1.13.5", "axios": "^1.13.5",
@ -31,11 +34,13 @@
"vue-router": "4.2.4" "vue-router": "4.2.4"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.39.2",
"@faker-js/faker": "^9.0.3", "@faker-js/faker": "^9.0.3",
"@pinia/testing": "0.1.2", "@pinia/testing": "0.1.2",
"@playwright/test": "^1.56.1", "@playwright/test": "^1.56.1",
"@rushstack/eslint-patch": "^1.3.2", "@rushstack/eslint-patch": "^1.3.2",
"@saucelabs/playwright-reporter": "^1.5.0", "@saucelabs/playwright-reporter": "^1.5.0",
"@stylistic/eslint-plugin": "^5.6.1",
"@testing-library/jest-dom": "5.16.5", "@testing-library/jest-dom": "5.16.5",
"@testing-library/user-event": "14.4.3", "@testing-library/user-event": "14.4.3",
"@testing-library/vue": "6.6.1", "@testing-library/vue": "6.6.1",
@ -48,6 +53,8 @@
"@vue/cli-plugin-router": "~5.0.0", "@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-unit-jest": "~5.0.0", "@vue/cli-plugin-unit-jest": "~5.0.0",
"@vue/cli-service": "~5.0.0", "@vue/cli-service": "~5.0.0",
"@vue/eslint-config-prettier": "^10.2.0",
"@vue/eslint-config-typescript": "^14.6.0",
"@vue/test-utils": "^2.4.1", "@vue/test-utils": "^2.4.1",
"@vue/vue3-jest": "^27.0.0-alpha.1", "@vue/vue3-jest": "^27.0.0-alpha.1",
"axe-core": "^4.10.2", "axe-core": "^4.10.2",
@ -57,8 +64,11 @@
"concurrently": "^9.1.2", "concurrently": "^9.1.2",
"dotenv-safe": "^9.1.0", "dotenv-safe": "^9.1.0",
"eslint": "^9.39.2", "eslint": "^9.39.2",
"eslint-plugin-vue": "^9.15.1", "eslint-plugin-import": "^2.32.0",
"eslint-plugin-jsdoc": "^61.5.0",
"eslint-plugin-vue": "^10.6.2",
"form-data": "^4.0.4", "form-data": "^4.0.4",
"globals": "^17.0.0",
"jest": "^27.0.5", "jest": "^27.0.5",
"jest-junit": "^13.0.0", "jest-junit": "^13.0.0",
"jest-serializer-vue": "^3.1.0", "jest-serializer-vue": "^3.1.0",
@ -66,13 +76,14 @@
"jsdom": "^22.1.0", "jsdom": "^22.1.0",
"luxon": "^3.5.0", "luxon": "^3.5.0",
"ortoni-report": "^2.0.8", "ortoni-report": "^2.0.8",
"prettier": "^3.7.4",
"sass": "^1.77.8", "sass": "^1.77.8",
"sass-loader": "^12.0.0", "sass-loader": "^12.0.0",
"saucectl": "^0.188.0", "saucectl": "^0.188.0",
"typescript-eslint": "^8.11.0", "typescript-eslint": "^8.11.0",
"vite": "^6.4.1", "vite": "^6.4.1",
"vitest": "^3.2.4", "vitest": "^3.2.4",
"volar-service-vetur": "latest", "vue-eslint-parser": "^10.2.0",
"wait-on": "^8.0.2" "wait-on": "^8.0.2"
} }
} }

View file

@ -44,7 +44,7 @@ export default {
watch: { watch: {
shouldShowLoader(newVal) { shouldShowLoader(newVal) {
// prevent keyboard input when loader is shown, re-enable when hidden // prevent keyboard input when loader is shown, re-enable when hidden
if(newVal) { if (newVal) {
document.onkeydown = () => false; document.onkeydown = () => false;
} }
else { else {

View file

@ -122,7 +122,6 @@ const endpoints = Object.freeze({
zipCode, zipCode,
applicationName, applicationName,
referralSequenceNumber referralSequenceNumber
// eslint-disable-next-line max-len
) => `${PARTS_BASE_URL}/recal-parts/${carId}/${partNumber}/${recalibrationType}/${parentAccountNumber}/${zipCode}/${applicationName}/${referralSequenceNumber}`, ) => `${PARTS_BASE_URL}/recal-parts/${carId}/${partNumber}/${recalibrationType}/${parentAccountNumber}/${zipCode}/${applicationName}/${referralSequenceNumber}`,
method: 'GET' method: 'GET'
}, },

View file

@ -31,9 +31,7 @@ const errorMessages = Object.freeze({
INVALID_ZIP: 'The ZIP you entered was invalid. Please enter a valid ZIP.', INVALID_ZIP: 'The ZIP you entered was invalid. Please enter a valid ZIP.',
ZIP_CODE_NOT_SERVICED_FOR_VEHICLE: 'We do not currently offer glass service for your vehicle in this ZIP code. Please try another ZIP code.', ZIP_CODE_NOT_SERVICED_FOR_VEHICLE: 'We do not currently offer glass service for your vehicle in this ZIP code. Please try another ZIP code.',
VIN_REQUIRED: 'Please enter your VIN', VIN_REQUIRED: 'Please enter your VIN',
VIN_FORMAT: VIN_FORMAT: 'Invalid VIN. Please make sure that you entered the correct 17-digit, alpha-numeric number. VINs do not contain the letters I, O, or Q',
// eslint-disable-next-line max-len
'Invalid VIN. Please make sure that you entered the correct 17-digit, alpha-numeric number. VINs do not contain the letters I, O, or Q',
OPTION_REQUIRED: 'Please select an option', OPTION_REQUIRED: 'Please select an option',
VEHICLE_REQUIRED: 'Please select a vehicle', VEHICLE_REQUIRED: 'Please select a vehicle',
POLICY_NUMBER_REQUIRED: 'Policy number is required.', POLICY_NUMBER_REQUIRED: 'Policy number is required.',

View file

@ -119,7 +119,6 @@ export default {
this.handleClick(e); this.handleClick(e);
break; break;
case this.eventTypes.CHANGE: case this.eventTypes.CHANGE:
// eslint-disable-next-line no-unused-expressions
this.selectingInitiatesLoad this.selectingInitiatesLoad
? this.handleSelectionChange(e) ? this.handleSelectionChange(e)
: this.handleClick(e); : this.handleClick(e);

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import buttonQuestion from '@/digital-components/button-question/button-question.vue'; import buttonQuestion from '@/digital-components/button-question/button-question.vue';
import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { getMountOptions } from '@/helpers/unit-test-helper.js';

View file

@ -593,7 +593,6 @@ export default {
this.findFirstAvailableDateInView(); this.findFirstAvailableDateInView();
let attempts = 0; let attempts = 0;
while (!this.selectedDate && attempts < 5) { while (!this.selectedDate && attempts < 5) {
// eslint-disable-next-line no-await-in-loop
await this.gotoNextPage(); await this.gotoNextPage();
attempts += 1; attempts += 1;
} }

View file

@ -63,7 +63,6 @@ import { useForm } from 'vee-validate';
import { modalPositions } from '@/constants/component-variants'; import { modalPositions } from '@/constants/component-variants';
export default { export default {
// eslint-disable-next-line vue/multi-word-component-names
name: 'modal', name: 'modal',
components: { components: {
ButtonMain ButtonMain
@ -103,7 +102,6 @@ export default {
// TODO: Correct Duplicate key 'modalId' issue. // TODO: Correct Duplicate key 'modalId' issue.
// Probably just rename the prop. -br // Probably just rename the prop. -br
return { return {
// eslint-disable-next-line vue/no-dupe-keys
modalId, modalId,
meta, meta,
validate, validate,

View file

@ -157,7 +157,6 @@ export default {
initialValue initialValue
}; };
// eslint-disable-next-line no-shadow
const { errorMessage, handleBlur, handleChange, meta, validate, errors } = const { errorMessage, handleBlur, handleChange, meta, validate, errors } =
useField(props.inputId, props.validationRules, fieldOptions); useField(props.inputId, props.validationRules, fieldOptions);

View file

@ -96,7 +96,7 @@ export default {
); );
} }
if (error.response.status != '404') { if (error.response.status !== 404) {
global.$logger.logError( global.$logger.logError(
`${method}: ${endpoint}: ${error.message}`, `${method}: ${endpoint}: ${error.message}`,
error.response error.response

View file

@ -1,8 +1,3 @@
/* eslint-disable no-use-before-define */
/* eslint-disable no-param-reassign */
/* eslint-disable jsdoc/require-param-type */
/* eslint-disable jsdoc/require-param-description */
/* eslint-disable jsdoc/require-returns */
import dynamicStrings from '@/constants/dynamic-strings'; import dynamicStrings from '@/constants/dynamic-strings';
import { useMainStore } from '@/store'; import { useMainStore } from '@/store';
@ -300,7 +295,6 @@ function mapStringToState(str) {
// Our final string value that will be built from the matches. // Our final string value that will be built from the matches.
const stringBuilder = ''; const stringBuilder = '';
// eslint-disable-next-line no-restricted-syntax
for (const match of globalStateMatches) { for (const match of globalStateMatches) {
// Reset store state for each match. // Reset store state for each match.
const valueFromStore = getStoreValueFromString(match[2]); const valueFromStore = getStoreValueFromString(match[2]);
@ -331,12 +325,10 @@ function getStoreValueFromString(str) {
if (!str) return ''; if (!str) return '';
let storeOrStateObject = useMainStore(); let storeOrStateObject = useMainStore();
// eslint-disable-next-line no-restricted-syntax
for (const s of str.split('.')) { for (const s of str.split('.')) {
if (s === 'getters') continue; // For backward compatibility if (s === 'getters') continue; // For backward compatibility
// TODO: I don't think this next line is doing what they think it's doing. // TODO: I don't think this next line is doing what they think it's doing.
// eslint-disable-next-line eqeqeq, valid-typeof if (typeof storeOrStateObject[s] !== "undefined") {
if (typeof storeOrStateObject[s] != undefined) {
storeOrStateObject = storeOrStateObject[s]; storeOrStateObject = storeOrStateObject[s];
} else { } else {
break; break;
@ -384,13 +376,11 @@ export function processIfStatements(str, ifConditionKeyword, replacePlaceholderC
*/ */
function getAndFlagFirstNonNestedIfStatementWithKeyword(matches, ifConditionKeyword) { function getAndFlagFirstNonNestedIfStatementWithKeyword(matches, ifConditionKeyword) {
let index = 0; let index = 0;
// eslint-disable-next-line no-restricted-syntax
for (const match of matches) { for (const match of matches) {
if (match.groups.isIfStatement && match.groups.ifConditionType === ifConditionKeyword) { if (match.groups.isIfStatement && match.groups.ifConditionType === ifConditionKeyword) {
let interiorIndex = 0; let interiorIndex = 0;
let nestedLevel = 0; let nestedLevel = 0;
let elseStatementIndex = null; let elseStatementIndex = null;
// eslint-disable-next-line no-restricted-syntax
for (const interiorMatch of matches.slice(index + 1)) { for (const interiorMatch of matches.slice(index + 1)) {
if (interiorMatch.groups.isIfStatement) { if (interiorMatch.groups.isIfStatement) {
if (interiorMatch.groups.ifConditionType === ifConditionKeyword) { if (interiorMatch.groups.ifConditionType === ifConditionKeyword) {
@ -539,7 +529,6 @@ export function doesCopyContainTextLink(copy) {
export function setupModalLinks(context) { export function setupModalLinks(context) {
context.$nextTick(() => { context.$nextTick(() => {
const elements = document.getElementsByClassName('modal-text'); const elements = document.getElementsByClassName('modal-text');
// eslint-disable-next-line no-restricted-syntax
for (const element of elements) { for (const element of elements) {
const target = element.getAttribute('modalTarget'); const target = element.getAttribute('modalTarget');
if (target) { if (target) {
@ -626,7 +615,7 @@ export function getRouterLinkHtmlStringFromCopy(copy) {
/** /**
* Returns a phone link as an 'a' tag element * Returns a phone link as an 'a' tag element
* @param copy * @param phoneNumber
* @returns string * @returns string
*/ */
export function getPhoneLinkHtmlStringFromPhoneNumber(phoneNumber) { export function getPhoneLinkHtmlStringFromPhoneNumber(phoneNumber) {

View file

@ -6,7 +6,6 @@ import { useMainStore } from '@/store';
* @function isLocalhost * @function isLocalhost
*/ */
function isLocalhost() { function isLocalhost() {
// eslint-disable-next-line no-restricted-globals
return location.hostname.includes('localhost'); return location.hostname.includes('localhost');
} }
@ -30,7 +29,6 @@ function getCookieValueByName(name) {
Gets current domain without the subdomain for cookie. Gets current domain without the subdomain for cookie.
*/ */
function getDomainWithoutSubdomain() { function getDomainWithoutSubdomain() {
// eslint-disable-next-line no-restricted-globals
const url = location.hostname; const url = location.hostname;
if (isLocalhost()) { if (isLocalhost()) {
return 'localhost'; return 'localhost';

View file

@ -44,7 +44,6 @@ function hasMatchingReplacementOption(vehicleDamageOptions, selectedGlassToRepla
Rear: 'backGlassOptions' Rear: 'backGlassOptions'
}; };
// eslint-disable-next-line no-restricted-syntax
for (const glassToReplace of selectedGlassToReplace) { for (const glassToReplace of selectedGlassToReplace) {
const propName = optionsMap[glassToReplace.glassLocation]; const propName = optionsMap[glassToReplace.glassLocation];
const { availableReplacementOptions } = vehicleDamageOptions[propName]; const { availableReplacementOptions } = vehicleDamageOptions[propName];

View file

@ -134,7 +134,6 @@ export function getDateFormat(date, format) {
const hour = (`0${date.getHours()}`).slice(-2); const hour = (`0${date.getHours()}`).slice(-2);
const minute = (`0${date.getMinutes()}`).slice(-2); const minute = (`0${date.getMinutes()}`).slice(-2);
const second = (`0${date.getSeconds()}`).slice(-2); const second = (`0${date.getSeconds()}`).slice(-2);
// eslint-disable-next-line consistent-return
return format return format
.replace('yyyy', year) .replace('yyyy', year)
.replace('MM', month) .replace('MM', month)
@ -147,7 +146,6 @@ export function getDateFormat(date, format) {
export function padTo2Digits(time) { export function padTo2Digits(time) {
// Use the built-in method toString() with a radix of 10 to convert the time value to a decimal string // Use the built-in method toString() with a radix of 10 to convert the time value to a decimal string
// eslint-disable-next-line no-param-reassign
time = time.toString(10); time = time.toString(10);
// Use the conditional operator to check if the length of the string is less than 2 // Use the conditional operator to check if the length of the string is less than 2
return time.length < 2 return time.length < 2
@ -172,7 +170,6 @@ export function convertMsToTime(milliseconds) {
export function calculateDuration(startDate, endDate) { export function calculateDuration(startDate, endDate) {
if (startDate instanceof Date !== true) return; if (startDate instanceof Date !== true) return;
if (endDate instanceof Date !== true) return; if (endDate instanceof Date !== true) return;
// eslint-disable-next-line consistent-return
return convertMsToTime(endDate - startDate); return convertMsToTime(endDate - startDate);
} }

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
import { experimentSettings } from '@/constants/experiments'; import { experimentSettings } from '@/constants/experiments';
export function hasExperimentSetting(storeExperimentSettings, settingName) { export function hasExperimentSetting(storeExperimentSettings, settingName) {

View file

@ -139,7 +139,7 @@ function defineGlobalTpaSearchRules() {
return errorMessages.TPA_SEARCH_SHOP_FORMAT; return errorMessages.TPA_SEARCH_SHOP_FORMAT;
} }
} else { } else {
if (value.length != 5) { if (value.length !== 5) {
return errorMessages.TPA_SEARCH_ZIP_FORMAT; return errorMessages.TPA_SEARCH_ZIP_FORMAT;
} }
} }

View file

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export function getLineItemsFlattened(lineItems) { export function getLineItemsFlattened(lineItems) {
return lineItems?.flatMap((li) => [li, ...(getLineItemsFlattened(li.childParts))]) ?? []; return lineItems?.flatMap((li) => [li, ...(getLineItemsFlattened(li.childParts))]) ?? [];
} }

View file

@ -13,7 +13,6 @@ export function deepClone(object) {
} }
const clone = { ...object }; const clone = { ...object };
// eslint-disable-next-line no-return-assign
Object.keys(clone).forEach((key) => Object.keys(clone).forEach((key) =>
(clone[key] = typeof object[key] === 'object' ? deepClone(object[key]) : object[key])); (clone[key] = typeof object[key] === 'object' ? deepClone(object[key]) : object[key]));

View file

@ -6,7 +6,6 @@
export function getPriceOfLineItem(lineItem) { export function getPriceOfLineItem(lineItem) {
let price = (lineItem.kitPrice ?? 0) + (lineItem.laborAmount ?? 0) + (lineItem.sellingPrice ?? 0); let price = (lineItem.kitPrice ?? 0) + (lineItem.laborAmount ?? 0) + (lineItem.sellingPrice ?? 0);
if (lineItem.childParts && lineItem.childParts.length !== 0) { if (lineItem.childParts && lineItem.childParts.length !== 0) {
// eslint-disable-next-line no-use-before-define
price += getPriceOfLineItems(lineItem.childParts); price += getPriceOfLineItems(lineItem.childParts);
} }
return price; return price;
@ -15,7 +14,6 @@ export function getPriceOfLineItem(lineItem) {
export function getSalesTaxOfLineItem(lineItem) { export function getSalesTaxOfLineItem(lineItem) {
let price = lineItem.salesTax ?? 0; let price = lineItem.salesTax ?? 0;
if (lineItem.childParts && lineItem.childParts.length !== 0) { if (lineItem.childParts && lineItem.childParts.length !== 0) {
// eslint-disable-next-line no-use-before-define
price += getTaxOfLineItems(lineItem.childParts); price += getTaxOfLineItems(lineItem.childParts);
} }
return price; return price;

View file

@ -44,7 +44,6 @@ describe('querystring-helper', () => {
const result = getLineItemQueryString(lineItems, 'param'); const result = getLineItemQueryString(lineItems, 'param');
// Assert // Assert
// eslint-disable-next-line max-len
expect(result).toBe('&param[0].partNumber=a&param[1].partNumber=b&param[2].partNumber=c&param[3].partNumber=d&param[4].partNumber=e'); expect(result).toBe('&param[0].partNumber=a&param[1].partNumber=b&param[2].partNumber=c&param[3].partNumber=d&param[4].partNumber=e');
}); });
}); });
@ -74,7 +73,6 @@ describe('querystring-helper', () => {
const result = getTaxLineItemQueryString(lineItems, 'param'); const result = getTaxLineItemQueryString(lineItems, 'param');
// Assert // Assert
// eslint-disable-next-line max-len
expect(result).toBe('&param[0].partNumber=a&param[0].laborAmount=0&param[0].sellingPrice=10&param[0].kitPrice=10&param[1].partNumber=b&param[1].laborAmount=10&param[1].sellingPrice=10&param[1].kitPrice=0&param[2].partNumber=c&param[2].laborAmount=5&param[2].sellingPrice=5&param[2].kitPrice=5&param[3].partNumber=d&param[3].laborAmount=10&param[3].sellingPrice=10&param[3].kitPrice=10'); expect(result).toBe('&param[0].partNumber=a&param[0].laborAmount=0&param[0].sellingPrice=10&param[0].kitPrice=10&param[1].partNumber=b&param[1].laborAmount=10&param[1].sellingPrice=10&param[1].kitPrice=0&param[2].partNumber=c&param[2].laborAmount=5&param[2].sellingPrice=5&param[2].kitPrice=5&param[3].partNumber=d&param[3].laborAmount=10&param[3].sellingPrice=10&param[3].kitPrice=10');
}); });
}); });

View file

@ -114,7 +114,7 @@ const currencyFormatter = new Intl.NumberFormat('en-US', {
/** /**
* @function formatAmountInDollars * @function formatAmountInDollars
* @param {string, number} amount * @param {string | number} amount
* @returns {string} * @returns {string}
*/ */
export function formatAmountInDollars(amount) { export function formatAmountInDollars(amount) {

View file

@ -1,4 +1,3 @@
/* eslint-disable import/no-extraneous-dependencies */
import { RouterLinkStub } from '@vue/test-utils'; import { RouterLinkStub } from '@vue/test-utils';
import { createTestingPinia } from '@pinia/testing'; import { createTestingPinia } from '@pinia/testing';
import navigationScenarios from '@/router/router-constants/navigation-scenarios.js'; import navigationScenarios from '@/router/router-constants/navigation-scenarios.js';
@ -60,9 +59,7 @@ export function getMountOptions(mockData) {
// Heritage integration common methods // Heritage integration common methods
export const cookies = { export const cookies = {
[cookieNames.ISS_SESSION_INFO]: [cookieNames.ISS_SESSION_INFO]: '{"ReferralNumber":"1566818","ReferralDate":"2022-03-15T10:56:24.597","ReferralCorrelationId":"404d2b04-f86e-45c3-b373-127b6217b060","ShouldResetState":false}',
// eslint-disable-next-line max-len
'{"ReferralNumber":"1566818","ReferralDate":"2022-03-15T10:56:24.597","ReferralCorrelationId":"404d2b04-f86e-45c3-b373-127b6217b060","ShouldResetState":false}',
UNIQUE_SESSION_ID: '33756020-b58e-4ec7-b8b8-3f1576719c40', UNIQUE_SESSION_ID: '33756020-b58e-4ec7-b8b8-3f1576719c40',
anotherCookie: '{}', anotherCookie: '{}',
someOtherCookie: '{}', someOtherCookie: '{}',

View file

@ -232,7 +232,6 @@ export default {
const self = this; const self = this;
this.$nextTick(() => { this.$nextTick(() => {
this.showAllFields = true; this.showAllFields = true;
// eslint-disable-next-line no-restricted-syntax
let processedStreetAddress = false; let processedStreetAddress = false;
let processedRoute = false; let processedRoute = false;
for (const component of googlePlace.address_components) { for (const component of googlePlace.address_components) {

View file

@ -373,7 +373,7 @@ export default {
const label = this.cartOrder.damage.glassToReplace?.length > 0 const label = this.cartOrder.damage.glassToReplace?.length > 0
? this.getCmsContent(this.widget.warrantyText, widgetFields.TEXT_BLOCK_WIDGET.TEXT) ? this.getCmsContent(this.widget.warrantyText, widgetFields.TEXT_BLOCK_WIDGET.TEXT)
: this.getCmsContent(this.widget.guaranteeText, widgetFields.TEXT_BLOCK_WIDGET.TEXT); : this.getCmsContent(this.widget.guaranteeText, widgetFields.TEXT_BLOCK_WIDGET.TEXT);
return { return {
name: label, name: label,
cartItemType: cartItemType.WARRANTY, cartItemType: cartItemType.WARRANTY,
partType: partTypeStrings.WARRANTY, partType: partTypeStrings.WARRANTY,

View file

@ -90,7 +90,6 @@ function getMountedComponent(mainInitialState = {}, initialData = {}, propsData
async function awaitingSetupTicks(wrapper) { async function awaitingSetupTicks(wrapper) {
for (let i = 0; i < 11; i++) { for (let i = 0; i < 11; i++) {
// eslint-disable-next-line no-await-in-loop
await wrapper.vm.$nextTick(); await wrapper.vm.$nextTick();
} }
} }

View file

@ -119,8 +119,8 @@ export default {
const map = await this.getMap(zipBounds?.getCenter()); const map = await this.getMap(zipBounds?.getCenter());
await this.addMarkersToMap(map, markerPositions); await this.addMarkersToMap(map, markerPositions);
let positionsToDisplay = markerPositions.map((marker) => marker.position); const positionsToDisplay = markerPositions.map((marker) => marker.position);
if(zipBounds) { if (zipBounds) {
positionsToDisplay.push(zipBounds.getNorthEast()); positionsToDisplay.push(zipBounds.getNorthEast());
positionsToDisplay.push(zipBounds.getSouthWest()); positionsToDisplay.push(zipBounds.getSouthWest());
} }

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
// Components // Components
import questionsPageLayout from '@/iss-components/questions-page-layout/questions-page-layout.vue'; import questionsPageLayout from '@/iss-components/questions-page-layout/questions-page-layout.vue';

View file

@ -42,13 +42,11 @@
<script> <script>
import baseInputButton from '@/digital-components/base-input-button/base-input-button.vue'; import baseInputButton from '@/digital-components/base-input-button/base-input-button.vue';
import inputButtonWrapperMixin from '@/mixins/input-button-wrapper-mixin'; import inputButtonWrapperMixin from '@/mixins/input-button-wrapper-mixin';
import loader from '@/ux-components/loader/loader.vue';
export default { export default {
name: 'tpa-shop-list-button', name: 'tpa-shop-list-button',
components: { components: {
baseInputButton, baseInputButton
loader
}, },
mixins: [inputButtonWrapperMixin], mixins: [inputButtonWrapperMixin],
}; };

View file

@ -167,9 +167,7 @@ describe('address-lookup.vue', () => {
expect(wrapper.findComponent({ ref: 'alertMatchedTwoIdenticalYMMVehicle' }).isVisible()).toBe(true); expect(wrapper.findComponent({ ref: 'alertMatchedTwoIdenticalYMMVehicle' }).isVisible()).toBe(true);
}); });
// eslint-disable-next-line max-len test('if the looking up VIN by address is not allowed in the state selected display the Vin Lookup By HomeAddress Not Allowed Alert',
test(
'if the looking up VIN by address is not allowed in the state selected display the Vin Lookup By HomeAddress Not Allowed Alert',
async () => { async () => {
// Arrange // Arrange
const mockRegistrationAddress = { const mockRegistrationAddress = {
@ -364,9 +362,7 @@ describe('address-lookup.vue', () => {
); );
}); });
// eslint-disable-next-line max-len test('if a different vehicle is found than the one entered and the selected glass is not available for that vehicle, navigate back to vehicle-damage page',
test(
'if a different vehicle is found than the one entered and the selected glass is not available for that vehicle, navigate back to vehicle-damage page',
async () => { async () => {
// Arrange // Arrange
const mockRegistrationAddress = { const mockRegistrationAddress = {

View file

@ -107,7 +107,6 @@ export default {
siteSubHeader, siteSubHeader,
customerQuestions, customerQuestions,
alert, alert,
// eslint-disable-next-line vue/no-reserved-component-names
Form Form
}, },
mixins: [baseFormMixin, vinPagesMixin], mixins: [baseFormMixin, vinPagesMixin],
@ -153,9 +152,7 @@ export default {
).replaceAll('{custom:damage}', getDamageString()); ).replaceAll('{custom:damage}', getDamageString());
}, },
AlertMatchedDifferentVehicleBody() { AlertMatchedDifferentVehicleBody() {
const vinYmmFound = const vinYmmFound = `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
// eslint-disable-next-line max-len
`${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
const vinYmmExpected = `${useMainStore().order.vehicle.year} ${ const vinYmmExpected = `${useMainStore().order.vehicle.year} ${
useMainStore().order.vehicle.make useMainStore().order.vehicle.make
} ${useMainStore().order.vehicle.model}`; } ${useMainStore().order.vehicle.model}`;
@ -175,12 +172,8 @@ export default {
).replaceAll('{custom:damage}', getDamageString()); ).replaceAll('{custom:damage}', getDamageString());
}, },
AlertMatchedTwoIdenticalYMMVehicleBody() { AlertMatchedTwoIdenticalYMMVehicleBody() {
const vinYmmsFound = const vinYmmsFound = `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model} ${this.customAlertData?.vehicleInfo?.style}`;
// eslint-disable-next-line max-len const vinYmmsExpected = `${useMainStore().order.vehicle.year} ${useMainStore().order.vehicle.make} ${useMainStore().order.vehicle.model} ${useMainStore().order.vehicle.style}`;
`${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model} ${this.customAlertData?.vehicleInfo?.style}`;
const vinYmmsExpected =
// eslint-disable-next-line max-len
`${useMainStore().order.vehicle.year} ${useMainStore().order.vehicle.make} ${useMainStore().order.vehicle.model} ${useMainStore().order.vehicle.style}`;
return this.getCmsContent( return this.getCmsContent(
'AlertMatchedTwoIdenticalYMMVehicleWidget', 'AlertMatchedTwoIdenticalYMMVehicleWidget',
@ -191,9 +184,7 @@ export default {
.replaceAll('{custom:vinYmmsExpected}', vinYmmsExpected); .replaceAll('{custom:vinYmmsExpected}', vinYmmsExpected);
}, },
isTwoIdenticalYMMVehicleFound() { isTwoIdenticalYMMVehicleFound() {
const vinYmmFound = const vinYmmFound = `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
// eslint-disable-next-line max-len
`${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
const vinYmmExpected = `${useMainStore().order.vehicle.year} ${ const vinYmmExpected = `${useMainStore().order.vehicle.year} ${
useMainStore().order.vehicle.make useMainStore().order.vehicle.make
} ${useMainStore().order.vehicle.model}`; } ${useMainStore().order.vehicle.model}`;
@ -290,9 +281,7 @@ export default {
// Update button "Continue with..." // Update button "Continue with..."
showIssLoadingModal(false); showIssLoadingModal(false);
return this.$refs.siteFooter return this.$refs.siteFooter.updateButtonText(`Continue with ${carFound.year} ${carFound.make} ${carFound.model} ${this.forwardButtonCarStyle}`);
// eslint-disable-next-line max-len
.updateButtonText(`Continue with ${carFound.year} ${carFound.make} ${carFound.model} ${this.forwardButtonCarStyle}`);
} }
// update data // update data

View file

@ -81,11 +81,8 @@ export default {
).replaceAll('{custom:damage}', getDamageString()); ).replaceAll('{custom:damage}', getDamageString());
}, },
AlertMatchedTwoIdenticalYMMVehicleBody() { AlertMatchedTwoIdenticalYMMVehicleBody() {
const vinYmmsFound = const vinYmmsFound = `${this.selectedVehicle?.vehicle.year} ${this.selectedVehicle?.vehicle.make} ${this.selectedVehicle?.vehicle.model} ${this.selectedVehicle?.vehicle.style}`;
// eslint-disable-next-line max-len const vinYmmsExpected = `${this.vehicleSelected?.year} ${this.vehicleSelected?.make} ${this.vehicleSelected?.model} ${this.vehicleSelected?.style}`;
`${this.selectedVehicle?.vehicle.year} ${this.selectedVehicle?.vehicle.make} ${this.selectedVehicle?.vehicle.model} ${this.selectedVehicle?.vehicle.style}`;
const vinYmmsExpected =
`${this.vehicleSelected?.year} ${this.vehicleSelected?.make} ${this.vehicleSelected?.model} ${this.vehicleSelected?.style}`;
return this.getCmsContent('AlertMatchedTwoIdenticalYMMVehicleWidget', 'BodyText') return this.getCmsContent('AlertMatchedTwoIdenticalYMMVehicleWidget', 'BodyText')
.replaceAll('{custom:damage}', getDamageString()) .replaceAll('{custom:damage}', getDamageString())

View file

@ -190,9 +190,7 @@ describe('address-vehicles.vue', () => {
expect(wrapper.vm.forwardButtonAction).toReturn; expect(wrapper.vm.forwardButtonAction).toReturn;
}); });
// eslint-disable-next-line max-len test('Should navigate to CLICKED_FORWARD scenario if carId is different and selected glass not available for vehicle on navigateForward',
test(
'Should navigate to CLICKED_FORWARD scenario if carId is different and selected glass not available for vehicle on navigateForward',
async () => { async () => {
// Arrange // Arrange
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});

View file

@ -118,7 +118,6 @@ export default {
siteFooter, siteFooter,
siteHeader, siteHeader,
siteSubHeader, siteSubHeader,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
alert, alert,
addressVehiclesQuestion addressVehiclesQuestion

View file

@ -108,7 +108,6 @@ export default {
siteSubHeader, siteSubHeader,
siteFooter, siteFooter,
textboxQuestion, textboxQuestion,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
textBlock textBlock
}, },

View file

@ -29,9 +29,7 @@ const baseStoreGettersPageData = () => ({
capabilityQuestions: [ capabilityQuestions: [
{ {
questionSequence: 1, questionSequence: 1,
questionText: questionText: 'Is your vehicle equipped with the optional Lane-Keeping System which tugs on the steering wheel and/or beeps to alert you if you drift too close to the edge of the lane?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with the optional Lane-Keeping System which tugs on the steering wheel and/or beeps to alert you if you drift too close to the edge of the lane?',
answers: [ answers: [
{ {
answerResult1: 'DYNAMIC', answerResult1: 'DYNAMIC',
@ -67,17 +65,13 @@ const baseStoreGettersDamage = () => ({
result: 'FW04848', result: 'FW04848',
answeredQuestions: [ answeredQuestions: [
{ {
questionText: questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
selectedAnswer: '1|nextQuestion|3|Yes', selectedAnswer: '1|nextQuestion|3|Yes',
selectedAnswerText: 'Yes', selectedAnswerText: 'Yes',
questionNum: 1 questionNum: 1
}, },
{ {
questionText: questionText: 'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
selectedAnswer: '2|nextQuestion|3|Yes', selectedAnswer: '2|nextQuestion|3|Yes',
selectedAnswerText: 'Yes', selectedAnswerText: 'Yes',
questionNum: 2 questionNum: 2
@ -212,17 +206,13 @@ describe('capabilityQuestions.vue', () => {
answerResult: 'FW04848', answerResult: 'FW04848',
answeredQuestions: [ answeredQuestions: [
{ {
questionText: questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
selectedAnswer: '1|nextQuestion|3|Yes', selectedAnswer: '1|nextQuestion|3|Yes',
selectedAnswerText: 'Yes', selectedAnswerText: 'Yes',
questionNum: 1 questionNum: 1
}, },
{ {
questionText: questionText: 'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
selectedAnswer: '2|nextQuestion|3|Yes', selectedAnswer: '2|nextQuestion|3|Yes',
selectedAnswerText: 'Yes', selectedAnswerText: 'Yes',
questionNum: 2 questionNum: 2

View file

@ -35,7 +35,6 @@ import questionsPageLayout from '@/iss-components/questions-page-layout/question
export default { export default {
name: 'capability-questions', name: 'capability-questions',
components: { components: {
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
questionsPageLayout questionsPageLayout
}, },

View file

@ -147,7 +147,6 @@ export default {
checkbox, checkbox,
textareaQuestion, textareaQuestion,
siteFooter, siteFooter,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
alert, alert,
buttonQuestion, buttonQuestion,

View file

@ -1,4 +1,3 @@
<!-- eslint-disable vue/no-v-html -->
<template> <template>
<transition <transition
name="fade" name="fade"

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
// Components // Components
import coverageStatement from '@/layouts/coverage-statement/coverage-statement.vue'; import coverageStatement from '@/layouts/coverage-statement/coverage-statement.vue';
@ -367,7 +366,6 @@ describe('coverageStatement.vue', () => {
[false, coverageStatuses.NO_COVERAGE, coverageType.ITAC], [false, coverageStatuses.NO_COVERAGE, coverageType.ITAC],
[false, coverageStatuses.NO_COVERAGE, coverageType.Deductible] [false, coverageStatuses.NO_COVERAGE, coverageType.Deductible]
])('isQuoteDisplayed', (expected, status, type) => { ])('isQuoteDisplayed', (expected, status, type) => {
// eslint-disable-next-line max-len
test(`$returns ${expected} when coverageStatus is ${getEnumName(coverageStatuses, status)} and coverageType is ${getEnumName(coverageType, type)}`, () => { test(`$returns ${expected} when coverageStatus is ${getEnumName(coverageStatuses, status)} and coverageType is ${getEnumName(coverageType, type)}`, () => {
// Arrange // Arrange
const mainInitialState = { const mainInitialState = {
@ -725,7 +723,6 @@ describe('coverageStatement.vue', () => {
// Act // Act
coverageStatement.beforeRouteEnter.call(wrapper.vm, undefined, undefined, next); coverageStatement.beforeRouteEnter.call(wrapper.vm, undefined, undefined, next);
for (let i = 0; i < 7; i++) { for (let i = 0; i < 7; i++) {
// eslint-disable-next-line no-await-in-loop
await nextTick(); await nextTick();
} }
@ -751,7 +748,6 @@ describe('coverageStatement.vue', () => {
// Act // Act
coverageStatement.beforeRouteEnter.call(wrapper.vm, undefined, undefined, next); coverageStatement.beforeRouteEnter.call(wrapper.vm, undefined, undefined, next);
for (let i = 0; i < 7; i++) { for (let i = 0; i < 7; i++) {
// eslint-disable-next-line no-await-in-loop
await nextTick(); await nextTick();
} }

View file

@ -1,8 +1,6 @@
<!-- eslint-disable vue/no-v-html -->
<template> <template>
<Form <Form
ref="theForm" ref="theForm"
v-slot="{ meta }"
@submit="onSubmit" @submit="onSubmit"
@invalidSubmit="onInvalidSubmit"> @invalidSubmit="onInvalidSubmit">
<div class="fade-on-route-transition coverage-statement"> <div class="fade-on-route-transition coverage-statement">
@ -141,7 +139,6 @@ export default {
name: 'coverage-statement', name: 'coverage-statement',
components: { components: {
siteHeader, siteHeader,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
contentGroupModal, contentGroupModal,
buttonMain, buttonMain,

View file

@ -426,7 +426,7 @@ describe('duplicateCheck.vue', () => {
expect(wrapper.vm.$router.navigate) expect(wrapper.vm.$router.navigate)
.toHaveBeenCalledWith(navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, undefined); .toHaveBeenCalledWith(navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, undefined);
}); });
// eslint-disable-next-line max-len
test('coverageType deductible and loaded duplicate with policy vehicle => CLICKED_FORWARD_LOADED_DUPLICATE_WITH_POLICY_VEHICLE', async () => { test('coverageType deductible and loaded duplicate with policy vehicle => CLICKED_FORWARD_LOADED_DUPLICATE_WITH_POLICY_VEHICLE', async () => {
// Arrange // Arrange
const vin = getRandomString(17, 17); const vin = getRandomString(17, 17);
@ -454,7 +454,7 @@ describe('duplicateCheck.vue', () => {
expect(wrapper.vm.$router.navigate) expect(wrapper.vm.$router.navigate)
.toHaveBeenCalledWith(navigationScenarios.CLICKED_FORWARD_LOADED_DUPLICATE_WITH_POLICY_VEHICLE, undefined); .toHaveBeenCalledWith(navigationScenarios.CLICKED_FORWARD_LOADED_DUPLICATE_WITH_POLICY_VEHICLE, undefined);
}); });
// eslint-disable-next-line max-len
test('coverageType deductible and loaded duplicate with non policy vehicle => CLICKED_FORWARD_LOADED_DUPLICATE_WITH_NON_POLICY_VEHICLE', async () => { test('coverageType deductible and loaded duplicate with non policy vehicle => CLICKED_FORWARD_LOADED_DUPLICATE_WITH_NON_POLICY_VEHICLE', async () => {
// Arrange // Arrange
const vin = getRandomString(17, 17); const vin = getRandomString(17, 17);
@ -482,7 +482,7 @@ describe('duplicateCheck.vue', () => {
expect(wrapper.vm.$router.navigate) expect(wrapper.vm.$router.navigate)
.toHaveBeenCalledWith(navigationScenarios.CLICKED_FORWARD_LOADED_DUPLICATE_WITH_NON_POLICY_VEHICLE, undefined); .toHaveBeenCalledWith(navigationScenarios.CLICKED_FORWARD_LOADED_DUPLICATE_WITH_NON_POLICY_VEHICLE, undefined);
}); });
// eslint-disable-next-line max-len
test('coverageType deductible and loaded duplicate with no policy vehicles => CLICKED_FORWARD_LOADED_DUPLICATE_WITH_NO_POLICY_VEHICLES', async () => { test('coverageType deductible and loaded duplicate with no policy vehicles => CLICKED_FORWARD_LOADED_DUPLICATE_WITH_NO_POLICY_VEHICLES', async () => {
// Arrange // Arrange
const { wrapper } = getMountedComponent({ const { wrapper } = getMountedComponent({

View file

@ -72,7 +72,6 @@ export default {
siteSubHeader, siteSubHeader,
buttonQuestion, buttonQuestion,
siteFooter, siteFooter,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
buttonMain buttonMain
}, },

View file

@ -256,7 +256,6 @@ describe('license-plate-lookup.vue', () => {
expect(wrapper.vm.navigateForwardWithSingleCarMatch).toHaveBeenCalledTimes(1); expect(wrapper.vm.navigateForwardWithSingleCarMatch).toHaveBeenCalledTimes(1);
}); });
// eslint-disable-next-line max-len, function-paren-newline
test('if a different vehicle is found than the one entered and the selected glass is not available for that vehicle, navigate back to vehicle-damage page', test('if a different vehicle is found than the one entered and the selected glass is not available for that vehicle, navigate back to vehicle-damage page',
async () => { async () => {
// Arrange // Arrange

View file

@ -115,7 +115,6 @@ defineRule('state-required', required(errorMessages.STATE_REQUIRED));
export default { export default {
name: 'license-plate-lookup', name: 'license-plate-lookup',
components: { components: {
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
siteFooter, siteFooter,
siteHeader, siteHeader,
@ -169,11 +168,8 @@ export default {
).replaceAll('{custom:damage}', getDamageString()); ).replaceAll('{custom:damage}', getDamageString());
}, },
AlertMatchedDifferentVehicleBody() { AlertMatchedDifferentVehicleBody() {
const vinYmmFound = const vinYmmFound = `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
// eslint-disable-next-line max-len const vinYmmExpected = `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make} ${this.mainStore.order.vehicle.model}`;
`${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
const vinYmmExpected = `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make}
${this.mainStore.order.vehicle.model}`;
return this.getCmsContent( return this.getCmsContent(
'AlertMatchedDifferentVehicleWidget', 'AlertMatchedDifferentVehicleWidget',
@ -190,12 +186,8 @@ export default {
).replaceAll('{custom:damage}', getDamageString()); ).replaceAll('{custom:damage}', getDamageString());
}, },
AlertMatchedTwoIdenticalYMMVehicleBody() { AlertMatchedTwoIdenticalYMMVehicleBody() {
const vinYmmsFound = const vinYmmsFound = `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model} ${this.customAlertData?.vehicleInfo?.style}`;
// eslint-disable-next-line max-len const vinYmmsExpected = `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make} ${this.mainStore.order.vehicle.model} ${this.mainStore.order.vehicle.style}`;
`${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model} ${this.customAlertData?.vehicleInfo?.style}`;
const vinYmmsExpected =
// eslint-disable-next-line max-len
`${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make} ${this.mainStore.order.vehicle.model} ${this.mainStore.order.vehicle.style}`;
return this.getCmsContent( return this.getCmsContent(
'AlertMatchedTwoIdenticalYMMVehicleWidget', 'AlertMatchedTwoIdenticalYMMVehicleWidget',
@ -206,9 +198,7 @@ export default {
.replaceAll('{custom:vinYmmsExpected}', vinYmmsExpected); .replaceAll('{custom:vinYmmsExpected}', vinYmmsExpected);
}, },
isTwoIdenticalYMMVehicleFound() { isTwoIdenticalYMMVehicleFound() {
const vinYmmFound = const vinYmmFound = `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
// eslint-disable-next-line max-len
`${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
const vinYmmExpected = `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make} const vinYmmExpected = `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make}
${this.mainStore.order.vehicle.model}`; ${this.mainStore.order.vehicle.model}`;
return vinYmmFound.toLowerCase() === vinYmmExpected.toLowerCase(); return vinYmmFound.toLowerCase() === vinYmmExpected.toLowerCase();
@ -300,9 +290,7 @@ export default {
showIssLoadingModal(false); showIssLoadingModal(false);
// Update button "Continue with..." // Update button "Continue with..."
return this.$refs.siteFooter return this.$refs.siteFooter.updateButtonText(`Continue with ${vehicleFromLookup.year} ${vehicleFromLookup.make} ${vehicleFromLookup.model} ${this.forwardButtonCarStyle}`);
// eslint-disable-next-line max-len
.updateButtonText(`Continue with ${vehicleFromLookup.year} ${vehicleFromLookup.make} ${vehicleFromLookup.model} ${this.forwardButtonCarStyle}`);
} }
// Save vehicle, license plate, and registration information // Save vehicle, license plate, and registration information

View file

@ -132,17 +132,13 @@ const baseStoreGettersDamage = () => ({
result: 'FW04848', result: 'FW04848',
answeredQuestions: [ answeredQuestions: [
{ {
questionText: questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
selectedAnswer: '1|nextQuestion|3|Yes', selectedAnswer: '1|nextQuestion|3|Yes',
selectedAnswerText: 'Yes', selectedAnswerText: 'Yes',
questionNum: 1 questionNum: 1
}, },
{ {
questionText: questionText: 'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
selectedAnswer: '2|nextQuestion|3|Yes', selectedAnswer: '2|nextQuestion|3|Yes',
selectedAnswerText: 'Yes', selectedAnswerText: 'Yes',
questionNum: 2 questionNum: 2
@ -219,17 +215,13 @@ describe('moldingQuestions.vue', () => {
answerResult: 'FW04848', answerResult: 'FW04848',
answeredQuestions: [ answeredQuestions: [
{ {
questionText: questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
selectedAnswer: '1|nextQuestion|3|Yes', selectedAnswer: '1|nextQuestion|3|Yes',
selectedAnswerText: 'Yes', selectedAnswerText: 'Yes',
questionNum: 1 questionNum: 1
}, },
{ {
questionText: questionText: 'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
selectedAnswer: '2|nextQuestion|3|Yes', selectedAnswer: '2|nextQuestion|3|Yes',
selectedAnswerText: 'Yes', selectedAnswerText: 'Yes',
questionNum: 2 questionNum: 2

View file

@ -39,7 +39,6 @@ import questionsPageLayout from '@/iss-components/questions-page-layout/question
export default { export default {
name: 'molding-questions', name: 'molding-questions',
components: { components: {
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
questionsPageLayout questionsPageLayout
}, },
@ -150,7 +149,6 @@ export default {
// get parts from the questionAnswers // get parts from the questionAnswers
const partsOrQuestions = this.partsOrQuestionsData; const partsOrQuestions = this.partsOrQuestionsData;
// eslint-disable-next-line no-restricted-syntax
for (const answer of questionAnswersArray) { for (const answer of questionAnswersArray) {
partsOrQuestions.find((partOrQuestion) => partsOrQuestions.find((partOrQuestion) =>
partOrQuestion.glassLocation === answer.glassLocation partOrQuestion.glassLocation === answer.glassLocation

View file

@ -1,4 +1,3 @@
<template> <template>
<div <div
v-if="open" v-if="open"

View file

@ -138,7 +138,6 @@ import coverageType from '@/constants/coverage-type';
export default { export default {
name: 'order-confirmation', name: 'order-confirmation',
components: { components: {
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
siteHeader, siteHeader,
siteFooter, siteFooter,
@ -239,7 +238,7 @@ export default {
}, },
orderConfirmationUpdateAppointmentText() { orderConfirmationUpdateAppointmentText() {
let content = ''; let content = '';
if(this.isNoComp) { if (this.isNoComp) {
content = this.getCmsContentWithCustomValues( content = this.getCmsContentWithCustomValues(
this.widgets.emailConfirmationNoComp, this.widgets.emailConfirmationNoComp,
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT

View file

@ -90,9 +90,7 @@ const baseStoreGettersPageData = () => ({
partQuestions: [ partQuestions: [
{ {
questionSequence: 1, questionSequence: 1,
questionText: questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
answers: [ answers: [
{ {
answerResult: '', answerResult: '',
@ -122,16 +120,12 @@ const baseStoreGettersDamage = () => ({
result: 'FW04848', result: 'FW04848',
answeredQuestions: [ answeredQuestions: [
{ {
questionText: questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
selectedAnswerText: 'Yes', selectedAnswerText: 'Yes',
questionNum: 1 questionNum: 1
}, },
{ {
questionText: questionText: 'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
selectedAnswerText: 'Yes', selectedAnswerText: 'Yes',
questionNum: 2 questionNum: 2
} }

View file

@ -36,7 +36,6 @@ import navigationScenarios from '@/router/router-constants/navigation-scenarios'
export default { export default {
name: 'part-questions', name: 'part-questions',
components: { components: {
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
questionsPageLayout, questionsPageLayout,
}, },

View file

@ -1,7 +1,6 @@
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { getMountOptions } from '@/helpers/unit-test-helper.js';
// eslint-disable-next-line max-len
import paymentMethodListButton from '@/layouts/payment-method/payment-method-question/payment-method-list-button/payment-method-list-button.vue'; import paymentMethodListButton from '@/layouts/payment-method/payment-method-question/payment-method-list-button/payment-method-list-button.vue';
const testConstants = { const testConstants = {

View file

@ -90,7 +90,6 @@ import { supportsApplePay } from '@/helpers/browser-helper';
export default { export default {
name: 'payment-method', name: 'payment-method',
components: { components: {
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
siteHeader, siteHeader,
siteSubHeader, siteSubHeader,

View file

@ -415,7 +415,6 @@ export default {
cartDropdown, cartDropdown,
siteHeader, siteHeader,
siteFooter, siteFooter,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
alert alert
}, },

View file

@ -21,7 +21,6 @@ import showIssLoadingModal from '@/helpers/loading-modal-helper';
export default { export default {
name: 'payment-return', name: 'payment-return',
components: { components: {
// eslint-disable-next-line vue/no-reserved-component-names
Form Form
}, },
mixins: [BaseFormMixin], mixins: [BaseFormMixin],

View file

@ -79,7 +79,6 @@ export default {
siteSubHeader, siteSubHeader,
siteFooter, siteFooter,
buttonQuestion, buttonQuestion,
// eslint-disable-next-line vue/no-reserved-component-names
Form Form
}, },
mixins: [BaseFormMixin], mixins: [BaseFormMixin],

View file

@ -108,7 +108,6 @@ export default {
textboxQuestion, textboxQuestion,
addressQuestions, addressQuestions,
siteFooter, siteFooter,
// eslint-disable-next-line vue/no-reserved-component-names
Form Form
}, },
mixins: [BaseFormMixin], mixins: [BaseFormMixin],

View file

@ -93,10 +93,7 @@ describe('policy-vehicles.vue', () => {
}); });
describe('forwardButtonAction', () => { describe('forwardButtonAction', () => {
// eslint-disable-next-line max-len test('Selected VIN matches vehicle listed in system => update vehicle and navigate forward with CLICKED_FORWARD_LISTED_VEHICLE scenario.',
test(
// eslint-disable-next-line max-len
'Selected VIN matches vehicle listed in system => update vehicle and navigate forward with CLICKED_FORWARD_LISTED_VEHICLE scenario.',
async () => { async () => {
// Arrange // Arrange
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
@ -150,9 +147,7 @@ describe('policy-vehicles.vue', () => {
} }
); );
test( test('Selected VIN matches vehicle listed in system and policy vehicle has Educator endorsement => update vehicle and navigate forward with CLICKED_FORWARD_WITH_ENDORSEMENTS scenario.',
// eslint-disable-next-line max-len
'Selected VIN matches vehicle listed in system and policy vehicle has Educator endorsement => update vehicle and navigate forward with CLICKED_FORWARD_WITH_ENDORSEMENTS scenario.',
async () => { async () => {
// Arrange // Arrange
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
@ -203,9 +198,7 @@ describe('policy-vehicles.vue', () => {
} }
); );
test( test('Selected VIN matches vehicle listed in system and policy vehicle has Parking Guard endorsement => update vehicle and navigate forward with CLICKED_FORWARD_WITH_ENDORSEMENTS scenario.',
// eslint-disable-next-line max-len
'Selected VIN matches vehicle listed in system and policy vehicle has Parking Guard endorsement => update vehicle and navigate forward with CLICKED_FORWARD_WITH_ENDORSEMENTS scenario.',
async () => { async () => {
// Arrange // Arrange
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
@ -285,7 +278,6 @@ describe('policy-vehicles.vue', () => {
await wrapper.vm.forwardButtonAction(); await wrapper.vm.forwardButtonAction();
// Assert // Assert
// eslint-disable-next-line max-len
expect(wrapper.vm.mainStore.setBailout).toHaveBeenCalledWith(bailoutMessage.vehicleVinLookupError(vin, lookupReturnValue.data)); expect(wrapper.vm.mainStore.setBailout).toHaveBeenCalledWith(bailoutMessage.vehicleVinLookupError(vin, lookupReturnValue.data));
expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith( expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(
navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT, navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,
@ -296,9 +288,7 @@ describe('policy-vehicles.vue', () => {
} }
); );
test( test('Vehicle not found in lookupVehicleByVin call => policyVinFound false and navigate forward with CLICKED_FORWARD_WITH_CAR_ID_NOT_FOUND scenario.',
// eslint-disable-next-line max-len
'Vehicle not found in lookupVehicleByVin call => policyVinFound false and navigate forward with CLICKED_FORWARD_WITH_CAR_ID_NOT_FOUND scenario.',
async () => { async () => {
// Arrange // Arrange
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});

View file

@ -81,7 +81,6 @@ export default {
siteHeader, siteHeader,
siteFooter, siteFooter,
policyVehiclesQuestion, policyVehiclesQuestion,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
alert alert
}, },

View file

@ -88,9 +88,7 @@ export default {
siteFooter, siteFooter,
siteHeader, siteHeader,
siteSubHeader, siteSubHeader,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
buttonQuestion,
buttonMain, buttonMain,
steeringModal, steeringModal,
tpaRecalModal, tpaRecalModal,
@ -111,7 +109,7 @@ export default {
vm.setCmsContent(resultMap.cmsContent); vm.setCmsContent(resultMap.cmsContent);
// open steering modal if it has body text, the state is defined in the CMS content and doesn't // open steering modal if it has body text, the state is defined in the CMS content and doesn't
// populate if the state is not listed in the CMS content // populate if the state is not listed in the CMS content
if (!!vm.$refs[STEERING_MODAL_REF_NAME].ModalBodyText) { if (vm.$refs[STEERING_MODAL_REF_NAME].ModalBodyText) {
vm.openStateSteeringModal(); vm.openStateSteeringModal();
} }
}); });

View file

@ -136,7 +136,7 @@ export default {
}, },
footerButtonClick() { footerButtonClick() {
if (this.tpaRecalAnswer && (!this.showAcknowledgementCheckbox || this.acknowledged )) { if (this.tpaRecalAnswer && (!this.showAcknowledgementCheckbox || this.acknowledged)) {
this.$refs[this.ModalName]?.closeModal(); this.$refs[this.ModalName]?.closeModal();
this.$emit('buttonClick', this.tpaRecalAnswer); this.$emit('buttonClick', this.tpaRecalAnswer);
} else if (!this.tpaRecalAnswer) { } else if (!this.tpaRecalAnswer) {
@ -182,7 +182,6 @@ export default {
} }
} }
.form-test-error { .form-test-error {
p { p {
font-weight: 500; font-weight: 500;

View file

@ -1,4 +1,3 @@
/* eslint-env jest */
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import userEvent from '@testing-library/user-event'; import userEvent from '@testing-library/user-event';
import issPageValues from '@/router/router-constants/issPage-values'; import issPageValues from '@/router/router-constants/issPage-values';

View file

@ -177,7 +177,6 @@ const getAvailableDates = async (
storeAction.payload.shopAppointmentType, storeAction.payload.shopAppointmentType,
storeAction.payload.providerNumber storeAction.payload.providerNumber
).catch(() => { ).catch(() => {
// eslint-disable-next-line no-console
console.warn('Error fetching shop time slots...'); console.warn('Error fetching shop time slots...');
}); });
} else if (storeAction.payload?.zipCodeOverride) { } else if (storeAction.payload?.zipCodeOverride) {
@ -186,7 +185,6 @@ const getAvailableDates = async (
storeAction.payload.endDate, storeAction.payload.endDate,
storeAction.payload.zipCodeOverride storeAction.payload.zipCodeOverride
).catch(() => { ).catch(() => {
// eslint-disable-next-line no-console
console.warn('Error fetching mobile time slots...'); console.warn('Error fetching mobile time slots...');
}); });
} }
@ -220,7 +218,6 @@ export default {
datePicker, datePicker,
serviceLocation, serviceLocation,
siteFooter, siteFooter,
// eslint-disable-next-line vue/no-reserved-component-names
Form Form
}, },
mixins: [BaseFormMixin], mixins: [BaseFormMixin],

View file

@ -91,7 +91,6 @@ import {
getServiceabilityDetails getServiceabilityDetails
} from '@/helpers/service-location-helper'; } from '@/helpers/service-location-helper';
import { deepClone } from '@/helpers/object-helper.js'; import { deepClone } from '@/helpers/object-helper.js';
// eslint-disable-next-line max-len
import vehicleProtectedQuestion from '@/layouts/schedule-page/service-location/mobile-location-modal-question/vehicle-protected-question/vehicle-protected-question.vue'; import vehicleProtectedQuestion from '@/layouts/schedule-page/service-location/mobile-location-modal-question/vehicle-protected-question/vehicle-protected-question.vue';
export default { export default {
@ -195,7 +194,6 @@ export default {
&& this.addressModel.zipCode !== '' && this.addressModel.zipCode !== ''
&& this.internalModel.isVehicleProtected !== null && this.internalModel.isVehicleProtected !== null
) { ) {
// eslint-disable-next-line max-len
return `${this.addressModel.streetAddress}\n${this.addressModel.city}, ${this.addressModel.state} ${this.addressModel.zipCode}`; return `${this.addressModel.streetAddress}\n${this.addressModel.city}, ${this.addressModel.state} ${this.addressModel.zipCode}`;
} }
return this.getCmsContent(this.linkWidgetName, 'BodyText'); return this.getCmsContent(this.linkWidgetName, 'BodyText');

View file

@ -26,7 +26,6 @@ export default {
buttonQuestion buttonQuestion
}, },
props: { props: {
// eslint-disable-next-line vue/require-prop-types
modelValue: { modelValue: {
isVehicleProtected: Boolean isVehicleProtected: Boolean
}, },

View file

@ -1,4 +1,3 @@
/* eslint-env jest */
import baseMixin from '@/mixins/base-mixin'; import baseMixin from '@/mixins/base-mixin';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { createTestingPinia } from '@pinia/testing'; import { createTestingPinia } from '@pinia/testing';

View file

@ -489,7 +489,6 @@ export default {
this.setMobileProviderNumber(initialData.providers.mobileProviderNumber); this.setMobileProviderNumber(initialData.providers.mobileProviderNumber);
let foundMatch = false; let foundMatch = false;
if (this.selectedProvider && this.selectedProvider.providerNumber) { if (this.selectedProvider && this.selectedProvider.providerNumber) {
// eslint-disable-next-line max-len
const matchedProvider = initialData.providers.shopProviders.find((provider) => provider.providerNumber === this.selectedProvider.providerNumber); const matchedProvider = initialData.providers.shopProviders.find((provider) => provider.providerNumber === this.selectedProvider.providerNumber);
if (matchedProvider) { if (matchedProvider) {
foundMatch = true; foundMatch = true;
@ -497,7 +496,6 @@ export default {
} }
} }
if (initialData.providers.shopProviders.length > 0 && !foundMatch) { if (initialData.providers.shopProviders.length > 0 && !foundMatch) {
// eslint-disable-next-line prefer-destructuring
this.selectedProvider = initialData.providers.shopProviders[0]; this.selectedProvider = initialData.providers.shopProviders[0];
} else if (initialData.providers.shopProviders.length === 0) { } else if (initialData.providers.shopProviders.length === 0) {
this.selectedProvider = null; this.selectedProvider = null;
@ -563,7 +561,6 @@ export default {
if (providers) { if (providers) {
this.setMobileProviderNumber(providers.mobileProviderNumber); this.setMobileProviderNumber(providers.mobileProviderNumber);
if (providers.shopProviders.length > 0) { if (providers.shopProviders.length > 0) {
// eslint-disable-next-line prefer-destructuring
this.selectedProvider = providers.shopProviders[0]; this.selectedProvider = providers.shopProviders[0];
} else { } else {
this.selectedProvider = null; this.selectedProvider = null;

View file

@ -177,7 +177,6 @@ export default {
return toTitleCase(this.modelValue.companyName); return toTitleCase(this.modelValue.companyName);
}, },
modalHeaderText() { modalHeaderText() {
// eslint-disable-next-line max-len
return this.getCmsContent(this.modalWidgetName, widgetFields.CONTENT_GROUP_WIDGET.HEADER_TEXT).replaceAll('{custom:serviceZipcode}', this.internalZipcode); return this.getCmsContent(this.modalWidgetName, widgetFields.CONTENT_GROUP_WIDGET.HEADER_TEXT).replaceAll('{custom:serviceZipcode}', this.internalZipcode);
}, },
modalFooterText() { modalFooterText() {
@ -262,14 +261,12 @@ export default {
} }
}, },
methods: { methods: {
// eslint-disable-next-line consistent-return
async updateShops(autoExpand = false) { async updateShops(autoExpand = false) {
this.errorMessage = ''; this.errorMessage = '';
let result = await this.getNearbyShops(this.searchRadiusInMiles); let result = await this.getNearbyShops(this.searchRadiusInMiles);
let currentSearchIndex = this.searchRadiusArray.findIndex((option) => option.Name === this.searchRadiusInMiles); let currentSearchIndex = this.searchRadiusArray.findIndex((option) => option.Name === this.searchRadiusInMiles);
while (autoExpand && result.length === 0 && currentSearchIndex < this.searchRadiusArray.length - 1) { while (autoExpand && result.length === 0 && currentSearchIndex < this.searchRadiusArray.length - 1) {
const newSearchRadius = this.searchRadiusArray[currentSearchIndex + 1].Name; const newSearchRadius = this.searchRadiusArray[currentSearchIndex + 1].Name;
// eslint-disable-next-line no-await-in-loop
result = await this.getNearbyShops(newSearchRadius); result = await this.getNearbyShops(newSearchRadius);
currentSearchIndex += 1; currentSearchIndex += 1;
} }

View file

@ -81,7 +81,6 @@ export default {
siteHeader, siteHeader,
siteFooter, siteFooter,
siteSubHeader, siteSubHeader,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
servicePackageQuestion, servicePackageQuestion,
loadingModal, loadingModal,

View file

@ -69,7 +69,6 @@ export default {
siteHeader, siteHeader,
siteFooter, siteFooter,
textBlock, textBlock,
// eslint-disable-next-line vue/no-reserved-component-names
Form Form
}, },
mixins: [BaseFormMixin], mixins: [BaseFormMixin],

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
// Components // Components
import tpaSearch from '@/layouts/tpa-search/tpa-search.vue'; import tpaSearch from '@/layouts/tpa-search/tpa-search.vue';

View file

@ -149,7 +149,6 @@ import bailoutMessage from '@/constants/bailoutMessage';
import settleAllPromises from '@/helpers/layout-helper'; import settleAllPromises from '@/helpers/layout-helper';
import issPageValues from '@/router/router-constants/issPage-values'; import issPageValues from '@/router/router-constants/issPage-values';
export default { export default {
name: 'tpa-search', name: 'tpa-search',
components: { components: {
@ -162,7 +161,6 @@ export default {
loader, loader,
googleMap, googleMap,
siteFooter, siteFooter,
// eslint-disable-next-line vue/no-reserved-component-names
Form Form
}, },
mixins: [BaseFormMixin], mixins: [BaseFormMixin],

View file

@ -131,12 +131,10 @@ export default {
components: { components: {
siteHeader, siteHeader,
textBlock, textBlock,
buttonMain,
reviewBlock, reviewBlock,
deductibleBox, deductibleBox,
siteFooter, siteFooter,
contactDetailsDrawer, contactDetailsDrawer,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
alert, alert,
modal modal
@ -300,7 +298,6 @@ export default {
this.getEditShopLinkText, this.getEditShopLinkText,
() => this.navigate(this.navigationScenarios.EDIT_PREFERRED_SHOP) () => this.navigate(this.navigationScenarios.EDIT_PREFERRED_SHOP)
), ),
// eslint-disable-next-line max-len
this.getSection( this.getSection(
this.getContactInfoTitle, this.getContactInfoTitle,
this.getContactInfoLines, this.getContactInfoLines,

View file

@ -87,7 +87,6 @@ export default {
watch: { watch: {
isAvailable(val) { isAvailable(val) {
// CHECK TO UPDATE SELECTED VALUES WHEN ISAVAILABLE IS TRUE // CHECK TO UPDATE SELECTED VALUES WHEN ISAVAILABLE IS TRUE
// eslint-disable-next-line no-unused-expressions
val && this.updateSelectedValues(); val && this.updateSelectedValues();
}, },
shouldDisplayReplaceOptionsQuestion(shouldDisplayReplaceOptionsQuestion) { shouldDisplayReplaceOptionsQuestion(shouldDisplayReplaceOptionsQuestion) {

View file

@ -1,4 +1,3 @@
/* eslint-env jest */
import { mount, flushPromises } from '@vue/test-utils'; import { mount, flushPromises } from '@vue/test-utils';
import { createTestingPinia } from '@pinia/testing'; import { createTestingPinia } from '@pinia/testing';
import navigationScenarios from '@/router/router-constants/navigation-scenarios'; import navigationScenarios from '@/router/router-constants/navigation-scenarios';

View file

@ -132,7 +132,6 @@ export default {
damageLocationQuestion, damageLocationQuestion,
windshieldOptions, windshieldOptions,
replaceOptionsQuestion, replaceOptionsQuestion,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
alert alert
}, },

View file

@ -1,5 +1,4 @@
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
// eslint-disable-next-line max-len
import windshieldChipCountQuestion from '@/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.vue'; import windshieldChipCountQuestion from '@/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.vue';
import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { getMountOptions } from '@/helpers/unit-test-helper.js';

View file

@ -1,5 +1,4 @@
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
// eslint-disable-next-line max-len
import windshieldDamageTypeQuestion from '@/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.vue'; import windshieldDamageTypeQuestion from '@/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.vue';
import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { getMountOptions } from '@/helpers/unit-test-helper.js';

View file

@ -1,4 +1,3 @@
/* eslint-env jest */
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import baseMixin from '@/mixins/base-mixin'; import baseMixin from '@/mixins/base-mixin';
import navigationScenarios from '@/router/router-constants/navigation-scenarios'; import navigationScenarios from '@/router/router-constants/navigation-scenarios';

View file

@ -51,7 +51,6 @@ import TextBlock from '@/digital-components/text-block/text-block.vue';
export default { export default {
name: 'vehicle-lookup', name: 'vehicle-lookup',
components: { components: {
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
SiteFooter, SiteFooter,
siteHeader, siteHeader,

View file

@ -68,7 +68,6 @@ import widgetFields from '@/constants/cms-widget-fields';
export default { export default {
name: 'vehicle-parts', name: 'vehicle-parts',
components: { components: {
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
glassPartQuestion, glassPartQuestion,
siteHeader, siteHeader,
@ -107,7 +106,6 @@ export default {
selectedGlassPartNumbers() { selectedGlassPartNumbers() {
// Compile all selected parts from the page. // Compile all selected parts from the page.
const numberArray = []; const numberArray = [];
// eslint-disable-next-line no-restricted-syntax
for (const glassPart of Object.values(this.selectedGlassParts)) { for (const glassPart of Object.values(this.selectedGlassParts)) {
if (glassPart?.partNumber) { if (glassPart?.partNumber) {
numberArray.push(glassPart.partNumber); numberArray.push(glassPart.partNumber);
@ -169,9 +167,7 @@ export default {
const matchedParts = []; const matchedParts = [];
// Match them to the parts from the API. // Match them to the parts from the API.
// eslint-disable-next-line no-restricted-syntax
for (const [key, value] of Object.entries(this.PartsFromApi.partsOrQuestions)) { for (const [key, value] of Object.entries(this.PartsFromApi.partsOrQuestions)) {
// eslint-disable-next-line no-restricted-syntax
for (const [partKey, partValue] of Object.entries(value.parts)) { for (const [partKey, partValue] of Object.entries(value.parts)) {
const currentPart = const currentPart =
this.PartsFromApi.partsOrQuestions[key].parts[partKey]; this.PartsFromApi.partsOrQuestions[key].parts[partKey];

View file

@ -96,7 +96,6 @@ export default {
siteHeader, siteHeader,
siteSubHeader, siteSubHeader,
siteFooter, siteFooter,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
vehicleQuestion, vehicleQuestion,
alert alert
@ -223,7 +222,6 @@ export default {
); );
}, },
(error) => { (error) => {
// eslint-disable-next-line max-len
this.mainStore.setBailout(bailoutMessage.vehicleYMMSLookupError(this.mainStore.vehicle.year, this.mainStore.vehicle.make, this.mainStore.vehicle.model, this.mainStore.vehicle.style, error)); this.mainStore.setBailout(bailoutMessage.vehicleYMMSLookupError(this.mainStore.vehicle.year, this.mainStore.vehicle.make, this.mainStore.vehicle.model, this.mainStore.vehicle.style, error));
this.$router.navigate( this.$router.navigate(
this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT, this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,
@ -260,7 +258,6 @@ export default {
return this.mainStore.getVehicleModels().then( return this.mainStore.getVehicleModels().then(
(response) => response, (response) => response,
(error) => { (error) => {
// eslint-disable-next-line max-len
this.mainStore.setBailout(bailoutMessage.vehicleYMMSLookupError(this.mainStore.vehicle.year, this.mainStore.vehicle.make, null, null, error)); this.mainStore.setBailout(bailoutMessage.vehicleYMMSLookupError(this.mainStore.vehicle.year, this.mainStore.vehicle.make, null, null, error));
this.$router.navigate( this.$router.navigate(
this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT, this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,
@ -273,7 +270,6 @@ export default {
return this.mainStore.getVehicleStyles().then( return this.mainStore.getVehicleStyles().then(
(response) => response, (response) => response,
(error) => { (error) => {
// eslint-disable-next-line max-len
this.mainStore.setBailout(bailoutMessage.vehicleYMMSLookupError(this.mainStore.vehicle.year, this.mainStore.vehicle.make, this.mainStore.vehicle.model, null, error)); this.mainStore.setBailout(bailoutMessage.vehicleYMMSLookupError(this.mainStore.vehicle.year, this.mainStore.vehicle.make, this.mainStore.vehicle.model, null, error));
this.$router.navigate( this.$router.navigate(
this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT, this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,

View file

@ -1,4 +1,3 @@
/* eslint-env jest */
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import userEvent from '@testing-library/user-event'; import userEvent from '@testing-library/user-event';
import '@testing-library/jest-dom'; import '@testing-library/jest-dom';

View file

@ -16,7 +16,7 @@ export default {
inject: ['vehicleFromLookup'] inject: ['vehicleFromLookup']
}; };
</script> </script>
<style> <style lang="scss">
/** /**
Override wrong margin-bottom rule in the Alert component. Override wrong margin-bottom rule in the Alert component.
*/ */

View file

@ -26,7 +26,7 @@ export default {
} }
}; };
</script> </script>
<style> <style lang="scss">
/** /**
Override wrong margin-bottom rule in the Alert component. Override wrong margin-bottom rule in the Alert component.
*/ */

View file

@ -15,7 +15,7 @@ export default {
} }
}; };
</script> </script>
<style> <style lang="scss">
/** /**
Override wrong margin-bottom rule in the Alert component. Override wrong margin-bottom rule in the Alert component.
*/ */

View file

@ -1,4 +1,3 @@
/* eslint-env jest */
import { getDamageString } from '@/helpers/damage-helper'; import { getDamageString } from '@/helpers/damage-helper';
import vehicleLookupAlertTypes from '@/constants/vehicle-lookup-alert-types'; import vehicleLookupAlertTypes from '@/constants/vehicle-lookup-alert-types';
import { RouterLinkStub } from '@vue/test-utils'; import { RouterLinkStub } from '@vue/test-utils';

View file

@ -1,4 +1,3 @@
/* eslint-env jest */
import '@testing-library/jest-dom'; import '@testing-library/jest-dom';
import { flushPromises } from '@vue/test-utils'; import { flushPromises } from '@vue/test-utils';
import { render, waitFor } from '@testing-library/vue'; import { render, waitFor } from '@testing-library/vue';
@ -296,7 +295,6 @@ describe('vin-lookup.vue', () => {
expect(mockRouter.navigateWithSpinner).toHaveBeenCalledWith(navigationScenarios.CLICKED_BACK, mockRoute); expect(mockRouter.navigateWithSpinner).toHaveBeenCalledWith(navigationScenarios.CLICKED_BACK, mockRoute);
}); });
// eslint-disable-next-line max-len
test('Different vehicle is found than the one entered and the selected glass is not available for that vehicle, navigate back to vehicle-damage page.', async () => { test('Different vehicle is found than the one entered and the selected glass is not available for that vehicle, navigate back to vehicle-damage page.', async () => {
const user = userEvent.setup(); const user = userEvent.setup();
mountOptions.global.stubs.vinQuestion = false; mountOptions.global.stubs.vinQuestion = false;
@ -334,7 +332,6 @@ describe('vin-lookup.vue', () => {
}); });
describe('Succesful navigateForward', () => { describe('Succesful navigateForward', () => {
// eslint-disable-next-line max-len
test('Vehicle with Part Questions. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_PART_QUESTIONS', async () => { test('Vehicle with Part Questions. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_PART_QUESTIONS', async () => {
const user = userEvent.setup(); const user = userEvent.setup();
mountOptions.global.stubs.vinQuestion = false; mountOptions.global.stubs.vinQuestion = false;
@ -366,7 +363,6 @@ describe('vin-lookup.vue', () => {
}); });
}); });
// eslint-disable-next-line max-len
test('Vehicle with Multiple Parts. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_MULTIPLE_PARTS_TO_CHOOSE', async () => { test('Vehicle with Multiple Parts. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_MULTIPLE_PARTS_TO_CHOOSE', async () => {
const user = userEvent.setup(); const user = userEvent.setup();
mountOptions.global.stubs.vinQuestion = false; mountOptions.global.stubs.vinQuestion = false;
@ -398,7 +394,6 @@ describe('vin-lookup.vue', () => {
}); });
}); });
// eslint-disable-next-line max-len
test('Vehicle with Molding Questions. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_MOLDING_QUESTIONS', async () => { test('Vehicle with Molding Questions. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_MOLDING_QUESTIONS', async () => {
const user = userEvent.setup(); const user = userEvent.setup();
mountOptions.global.stubs.vinQuestion = false; mountOptions.global.stubs.vinQuestion = false;
@ -430,7 +425,6 @@ describe('vin-lookup.vue', () => {
}); });
}); });
// eslint-disable-next-line max-len
test('Vehicle with Capability Questions. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_CAPABILITY_QUESTIONS', async () => { test('Vehicle with Capability Questions. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_CAPABILITY_QUESTIONS', async () => {
const user = userEvent.setup(); const user = userEvent.setup();
const store = useMainStore(); const store = useMainStore();
@ -465,7 +459,6 @@ describe('vin-lookup.vue', () => {
}); });
}); });
// eslint-disable-next-line max-len
test('Vehicle no additional Parts or Questions. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_NO_MORE_QUESTIONS', async () => { test('Vehicle no additional Parts or Questions. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_NO_MORE_QUESTIONS', async () => {
const user = userEvent.setup(); const user = userEvent.setup();
mountOptions.global.stubs.vinQuestion = false; mountOptions.global.stubs.vinQuestion = false;
@ -525,7 +518,6 @@ describe('vin-lookup.vue', () => {
}); });
}); });
// eslint-disable-next-line max-len
test('Policy Vehicle with invalid vin corrected. Click "Continue", execute navigate with navigationScenario.CORRECTED_VIN_FROM_POLICY_VEHICLE', async () => { test('Policy Vehicle with invalid vin corrected. Click "Continue", execute navigate with navigationScenario.CORRECTED_VIN_FROM_POLICY_VEHICLE', async () => {
const user = userEvent.setup(); const user = userEvent.setup();
mountOptions.global.stubs.vinQuestion = false; mountOptions.global.stubs.vinQuestion = false;

View file

@ -67,7 +67,6 @@ export default {
siteFooter, siteFooter,
siteHeader, siteHeader,
siteSubHeader, siteSubHeader,
// eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
vinLocationInformation, vinLocationInformation,
vinLookupAlerts, vinLookupAlerts,
@ -140,9 +139,7 @@ export default {
// TODO: Side effects in computed. // TODO: Side effects in computed.
if (this.vinPopulatedOnPageLoad) { if (this.vinPopulatedOnPageLoad) {
// TODO: Modify to remove side effects in computed // TODO: Modify to remove side effects in computed
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.PERFECT_MATCH; this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.PERFECT_MATCH;
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
this.needToLookupVehicle = false; this.needToLookupVehicle = false;
const lastSixChars = this.vin.substring(11, this.vin.length); const lastSixChars = this.vin.substring(11, this.vin.length);
return `!X!X!X!X!X!X!X!X!X!X!X${lastSixChars}`; return `!X!X!X!X!X!X!X!X!X!X!X${lastSixChars}`;
@ -220,9 +217,7 @@ export default {
vehicleLookupAlertTypes.NOT_MATCHED; vehicleLookupAlertTypes.NOT_MATCHED;
} }
const vehicleYearMakeModelStyle = const vehicleYearMakeModelStyle = `${this.vehicleFromLookup.year} ${this.vehicleFromLookup.make} ${this.vehicleFromLookup.model} ${this.forwardButtonCarStyle}`;
// eslint-disable-next-line max-len
`${this.vehicleFromLookup.year} ${this.vehicleFromLookup.make} ${this.vehicleFromLookup.model} ${this.forwardButtonCarStyle}`;
this.$refs.siteFooter.updateButtonText(`Continue with ${vehicleYearMakeModelStyle}`); this.$refs.siteFooter.updateButtonText(`Continue with ${vehicleYearMakeModelStyle}`);
this.needToLookupVehicle = false; this.needToLookupVehicle = false;
showIssLoadingModal(false); showIssLoadingModal(false);

View file

@ -42,7 +42,7 @@ export default {
} }
}; };
</script> </script>
<style> <style lang="scss">
#vin-question-wrapper .form-test-error { #vin-question-wrapper .form-test-error {
/** /**
Override extra margin-bottom in the error message in TextboxQuestion Override extra margin-bottom in the error message in TextboxQuestion

View file

@ -196,7 +196,6 @@ export default {
dropdownQuestion, dropdownQuestion,
siteFooter, siteFooter,
textBlock, textBlock,
// eslint-disable-next-line vue/no-reserved-component-names
Form Form
}, },
mixins: [BaseFormMixin], mixins: [BaseFormMixin],
@ -244,7 +243,6 @@ export default {
damageOption: 'damage-option-required', damageOption: 'damage-option-required',
extension: `${globalRules.EXTENSION_FORMAT}`, extension: `${globalRules.EXTENSION_FORMAT}`,
lossCity: `${globalRules.DATE_OF_LOSS_CITY_REQUIRED}|${globalRules.DATE_OF_LOSS_CITY_FORMAT}`, lossCity: `${globalRules.DATE_OF_LOSS_CITY_REQUIRED}|${globalRules.DATE_OF_LOSS_CITY_FORMAT}`,
// eslint-disable-next-line max-len
lossDate: `${globalRules.DATE_OF_LOSS_REQUIRED}|${globalRules.DATE_OF_LOSS_NOT_TEN_YEARS_PAST}|${globalRules.DATE_OF_LOSS_NOT_FUTURE}`, lossDate: `${globalRules.DATE_OF_LOSS_REQUIRED}|${globalRules.DATE_OF_LOSS_NOT_TEN_YEARS_PAST}|${globalRules.DATE_OF_LOSS_NOT_FUTURE}`,
lossState: `${globalRules.DATE_OF_LOSS_STATE_REQUIRED}`, lossState: `${globalRules.DATE_OF_LOSS_STATE_REQUIRED}`,
policyNumber: `${globalRules.POLICY_NUMBER_REQUIRED}|${globalRules.POLICY_NUMBER_FORMAT}`, policyNumber: `${globalRules.POLICY_NUMBER_REQUIRED}|${globalRules.POLICY_NUMBER_FORMAT}`,
@ -261,7 +259,6 @@ export default {
); );
const damageCauseAnswersObj = {}; const damageCauseAnswersObj = {};
if (damageCauseAnswers) { if (damageCauseAnswers) {
// eslint-disable-next-line no-restricted-syntax
for (const answer of Object.values(damageCauseAnswers)) { for (const answer of Object.values(damageCauseAnswers)) {
if (answer?.Name) { if (answer?.Name) {
damageCauseAnswersObj[answer.Name] = answer.Name; damageCauseAnswersObj[answer.Name] = answer.Name;
@ -287,7 +284,6 @@ export default {
}, },
getStates() { getStates() {
return Object.keys(states).reduce((acc, key) => { return Object.keys(states).reduce((acc, key) => {
// eslint-disable-next-line no-param-reassign
acc[key] = states[key].toUpperCase(); acc[key] = states[key].toUpperCase();
return acc; return acc;
}, {}); }, {});
@ -460,7 +456,6 @@ export default {
} }
}); });
} catch (error) { } catch (error) {
// eslint-disable-next-line no-console
console.error(`Error on loading session from cookie ${error}`); console.error(`Error on loading session from cookie ${error}`);
this.startNewReferral(); this.startNewReferral();
} finally { } finally {

View file

@ -45,7 +45,7 @@ function getPageName(vm) {
} }
// Vue Error Handling // Vue Error Handling
vueApp.config.errorHandler = (err, vm, info) => { vueApp.config.errorHandler = (err, vm, info) => {
const pageName= getPageName(vm); const pageName = getPageName(vm);
global.$logger.logError( global.$logger.logError(
`Page Name - ${pageName} - ${info}: ${err.message}\n${err.stack}` `Page Name - ${pageName} - ${info}: ${err.message}\n${err.stack}`
); );

View file

@ -1,4 +1,3 @@
/* eslint-disable import/no-cycle */
import { import {
areAllSessionCookiesSet, areAllSessionCookiesSet,
getDeviceIdValue, getDeviceIdValue,

View file

@ -76,7 +76,6 @@ describe('analyticsMixin.js', () => {
expect(expectedDataLayer).toEqual(expect.arrayContaining(window.dataLayer)); expect(expectedDataLayer).toEqual(expect.arrayContaining(window.dataLayer));
}); });
// eslint-disable-next-line max-len
test('pushEventToGA, should call dataLayer push and ValueToLogTypes.LAST_5 logs only the last 3 characters for a 3 character string', () => { test('pushEventToGA, should call dataLayer push and ValueToLogTypes.LAST_5 logs only the last 3 characters for a 3 character string', () => {
// Arrange // Arrange
window.dataLayer = []; window.dataLayer = [];

View file

@ -407,7 +407,6 @@ export default {
// go to capability-questions page and pass the partsData // go to capability-questions page and pass the partsData
// mimic part-questions page data for consistency // mimic part-questions page data for consistency
// eslint-disable-next-line no-restricted-syntax
for (const partOrQuestion of partsOrQuestions) { for (const partOrQuestion of partsOrQuestions) {
if (this.hasCapabilityQuestions([partOrQuestion])) { if (this.hasCapabilityQuestions([partOrQuestion])) {
const capabilityQuestionsForGlassLocation = const capabilityQuestionsForGlassLocation =

View file

@ -658,9 +658,7 @@ describe('vehicle-questions-mixin', () => {
questions: [ questions: [
{ {
questionSequence: 1, questionSequence: 1,
questionText: questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
answers: [ answers: [
{ {
answerResult: '', answerResult: '',
@ -677,9 +675,7 @@ describe('vehicle-questions-mixin', () => {
}, },
{ {
questionSequence: 2, questionSequence: 2,
questionText: questionText: 'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
// eslint-disable-next-line max-len
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
answers: [ answers: [
{ {
answerResult: 'FW04848', answerResult: 'FW04848',
@ -1200,7 +1196,6 @@ describe('vehicle-questions-mixin', () => {
describe('and the duplicate has an answerResult', () => { describe('and the duplicate has an answerResult', () => {
test( test(
// eslint-disable-next-line max-len
'then any questions in the same glass piece that lead to the duplicate should be modified to just provide the duplicate\'s answerResult', 'then any questions in the same glass piece that lead to the duplicate should be modified to just provide the duplicate\'s answerResult',
async () => { async () => {
// Arrange // Arrange
@ -2202,7 +2197,6 @@ describe('vehicle-questions-mixin', () => {
}); });
test( test(
// eslint-disable-next-line max-len
'current page is molding questions and there are part questions, multiple parts to choose, and capability questions => go to vehicle-parts', 'current page is molding questions and there are part questions, multiple parts to choose, and capability questions => go to vehicle-parts',
() => { () => {
// Arrange // Arrange

View file

@ -1,4 +1,3 @@
/* eslint-disable no-use-before-define */
import { createWebHistory, createRouter } from 'vue-router'; import { createWebHistory, createRouter } from 'vue-router';
import lazyLoadComponent from '@/router/dynamic-routing/component-loader'; import lazyLoadComponent from '@/router/dynamic-routing/component-loader';
import issPageValues from '@/router/router-constants/issPage-values'; import issPageValues from '@/router/router-constants/issPage-values';
@ -168,7 +167,6 @@ router.beforeEach(async (to, from) => {
}); });
router.afterEach(async (to, from) => { router.afterEach(async (to, from) => {
/*eslint-disable-line*/
const store = useMainStore(); const store = useMainStore();
// Update lastPageVisited in the store // Update lastPageVisited in the store
store.updateLastPageVisited(to.name); store.updateLastPageVisited(to.name);
@ -327,7 +325,6 @@ function navigate(
function navigateToUrl(url, optionalQuery = {}) { function navigateToUrl(url, optionalQuery = {}) {
// possibly show some loading screen in the future here. // possibly show some loading screen in the future here.
const externalUrl = new URL(url); const externalUrl = new URL(url);
// eslint-disable-next-line no-restricted-syntax, guard-for-in
for (const queryKey in optionalQuery) { for (const queryKey in optionalQuery) {
externalUrl.searchParams.append(queryKey, optionalQuery[queryKey]); externalUrl.searchParams.append(queryKey, optionalQuery[queryKey]);
} }

View file

@ -1,5 +1,3 @@
/* eslint-disable no-use-before-define */
/* eslint-disable max-len */
import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
import applicationConfig from '@/constants/application-config'; import applicationConfig from '@/constants/application-config';
import bailoutCode from '@/constants/bailoutCode'; import bailoutCode from '@/constants/bailoutCode';
@ -14,9 +12,7 @@ import partTypeStrings from '@/constants/part-type-strings';
import { paymentMethods } from '@/constants/payment-method-constants'; import { paymentMethods } from '@/constants/payment-method-constants';
import { AppointmentTypeStrings } from '@/constants/schedule-constants'; import { AppointmentTypeStrings } from '@/constants/schedule-constants';
import webStorageConstants from '@/constants/web-storage-constants'; import webStorageConstants from '@/constants/web-storage-constants';
// eslint-disable-next-line import/no-cycle
import globalMethods from '@/global-methods'; import globalMethods from '@/global-methods';
// eslint-disable-next-line import/no-cycle
import { getSessionKeyValue, getUserIdValue, deleteISSCookie, getDeviceIdValue } from '@/helpers/cookie-helper'; import { getSessionKeyValue, getUserIdValue, deleteISSCookie, getDeviceIdValue } from '@/helpers/cookie-helper';
import { convertDateStringToDate, getDateDifferenceInDays, militaryToTwelveHourTime } from '@/helpers/date-helper'; import { convertDateStringToDate, getDateDifferenceInDays, militaryToTwelveHourTime } from '@/helpers/date-helper';
import { getExperimentSettingValue, getFeatureTogglesPayloadObject } from '@/helpers/experiment-helper'; import { getExperimentSettingValue, getFeatureTogglesPayloadObject } from '@/helpers/experiment-helper';
@ -32,7 +28,6 @@ import {
getTaxLineItemQueryString getTaxLineItemQueryString
} from '@/helpers/querystring-helper'; } from '@/helpers/querystring-helper';
import { getTopLevelGlassPartsWithRecal } from '@/helpers/recal-helper'; import { getTopLevelGlassPartsWithRecal } from '@/helpers/recal-helper';
// eslint-disable-next-line import/no-cycle
import { getDateForSavedSessionTimeout } from '@/helpers/session-helper'; import { getDateForSavedSessionTimeout } from '@/helpers/session-helper';
import issPageValues from '@/router/router-constants/issPage-values'; import issPageValues from '@/router/router-constants/issPage-values';
@ -1617,7 +1612,6 @@ export const useMainStore = defineStore({
order.contactInfo.alternativePhone = data?.customer?.alternativePhone; order.contactInfo.alternativePhone = data?.customer?.alternativePhone;
order.contactInfo.requestTextUpdates = data?.customer?.isSmsOptIn; order.contactInfo.requestTextUpdates = data?.customer?.isSmsOptIn;
if (data?.customer?.address) { if (data?.customer?.address) {
order.customer.address.streetAddress = data.customer?.address?.streetAddress; order.customer.address.streetAddress = data.customer?.address?.streetAddress;
order.customer.address.streetAddress2 = data.customer?.address?.streetAddress2; order.customer.address.streetAddress2 = data.customer?.address?.streetAddress2;
@ -2460,7 +2454,7 @@ export const useMainStore = defineStore({
// populate initial state // populate initial state
populateInitialState(forceReset) { populateInitialState(forceReset) {
if (!sessionStorage.getItem(storeId) || forceReset ) { if (!sessionStorage.getItem(storeId) || forceReset) {
this.$state = state; this.$state = state;
} }
}, },

Some files were not shown because too many files have changed in this diff Show more