cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 - Unexpected Token > (ESLINT) Syntax Error in Web IDE

Hi all,

I found a line of code that allows me to filter an multidimensional array based on the value of a column.

var filteredKey = filteredKeyGlobalData.filter(p => p.ADV_TYPE == "KE");

Although the code works when I run it, it doesn't allow me to deploy to my ABAP repository due to the syntax error. After searching, I have found that I need to enable/disable some options in my ESLINT in the Web IDE?

Is there anyway to resolve this issue?

Thank you in advance..

Accepted Solutions (1)

Accepted Solutions (1)

gabmarian
Active Contributor

You need to set JavaScript 6 validator rules to your project settings. Check out the Configure ESLint part in this blog:

https://blogs.sap.com/2017/11/01/next-generation-javascript-in-ui5-using-sap-web-ide/

BR,
Gábor

0 Kudos

Working, thank you.

0 Kudos

Hi guys,

I'm facing the same problem as well. I'm following the walkthrough for SAPUI5, it all happens in my manifest file and neo-app file and furthermore the Invoice.js file(step 19). Any solution?

Parsing error: Unexpected token : [ESLINT: ()]

Eg: my manifest.js file

{
  "_version": "1.12.0", //error shows in this line
  "sap.app": {
	"id": "sap.ui.demo.walkthrough",
	"type": "application",
	"i18n": "i18n/i18n.properties",
	"title": "{{appTitle}}",
	"description": "{{appDescription}}",
	"applicationVersion": {
	  "version": "1.0.0"
	}
  },
  "sap.ui": {
	"technology": "UI5",
	"deviceTypes": {
		"desktop": true,
		"tablet": true,
		"phone": true
	}
  },
  "sap.ui5": {
	"rootView": {
		"viewName": "sap.ui.demo.walkthrough.view.App",
		"type": "XML",
		"id": "app"
	},
	"dependencies": {
	  "minUI5Version": "1.93",
	  "libs": {
		"sap.ui.core": {}
		"sap.m": {}
	  }
	},
	"models": {
	  "i18n": {
		"type": "sap.ui.model.resource.ResourceModel",
		"settings": {
		  "bundleName": "sap.ui.demo.walkthrough.i18n.i18n",
		  "supportedLocales": [""],
		  "fallbackLocale": ""
		}
	  }
	},
	"invoice": {
		"type": "sap.ui.model.json.JSONModel",
		"uri": "Invoices.json"
	},
	"contentDensities": {
		"cozy": true,
		"compact":false
	}
  }
}

Answers (0)