diff --git a/.eslintrc.js b/.eslintrc.js index c9deb6a3..440245f9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -18,8 +18,8 @@ module.exports = { 'vue/attribute-hyphenation': ['warn', 'never'], 'vue/v-on-event-hyphenation': ['warn', 'never'], 'object-curly-newline': ['error', { consistent: true }], - 'function-paren-newline': ['error', 'never'], - 'operator-linebreak': ['error', 'before', { overrides: { '=': 'after' }}], + 'function-paren-newline': ['error', 'multiline'], + 'operator-linebreak': ['error', 'before', { overrides: { '=': 'after' } }], 'implicit-arrow-linebreak': ['off'], 'comma-dangle': ['error', 'never'], indent: ['error', 4, { SwitchCase: 1 }], @@ -33,6 +33,7 @@ module.exports = { 'jsdoc/check-tag-names': ['error', { definedTags: ['store', 'endpoint', 'category', 'subcategory', 'remarks'] }], + 'jsdoc/require-jsdoc': 0, 'vue/html-self-closing': ['error', { html: { void: 'any', diff --git a/src/router/index.js b/src/router/index.js index 1b2e8ace..2fa73c97 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -160,24 +160,16 @@ router.overrideNavigation = ( optionalParams = {}, optionalPageData = {} ) => { - navigate( - scenario, currentRoute, isSavingNavigation, optionalQuery, optionalParams, optionalPageData - ); + navigate(scenario, currentRoute, isSavingNavigation, optionalQuery, optionalParams, optionalPageData); next(); }; -router.navigate = ( - scenario, currentRoute, optionalQuery = {}, optionalParams = {}, optionalPageData = {} -) => { - navigate( - scenario, currentRoute, optionalQuery, optionalParams, optionalPageData - ); +router.navigate = (scenario, currentRoute, optionalQuery = {}, optionalParams = {}, optionalPageData = {}) => { + navigate(scenario, currentRoute, optionalQuery, optionalParams, optionalPageData); }; // Navigate to the next route, depending on the scenario. -function navigate( - scenario, currentRoute, optionalQuery = {}, optionalParams = {}, optionalPageData = {} -) { +function navigate(scenario, currentRoute, optionalQuery = {}, optionalParams = {}, optionalPageData = {}) { /*eslint-disable-line*/ if (!scenario) { window.console.error('No scenario provided. Please review the routing table.'); @@ -200,8 +192,10 @@ function navigate( } else if (matchingScenarioMap.destinationIssPageValue) { // Update page data to the store for next page if provided. Otherwise, keep existing page data or set to empty object const existingPageDataForPage = useMainStore().pageData(matchingScenarioMap.destinationIssPageValue); - baseMixin.methods.savePageDataToStore(matchingScenarioMap.destinationIssPageValue, - Object.keys(optionalPageData).length > 0 ? optionalPageData : existingPageDataForPage ?? {}); + baseMixin.methods.savePageDataToStore( + matchingScenarioMap.destinationIssPageValue, + Object.keys(optionalPageData).length > 0 ? optionalPageData : existingPageDataForPage ?? {} + ); // We're always pushing the same path, just changing query strings. // Make sure our optional query strings get combined with our issPage one.