Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 506734

Summary: [tern-project] Including .json at the end of a custom index results in a JavaScript error
Product: [ECD] Orion Reporter: Sebastian Pahnke <pahnke.sebastian>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie
Version: 13.0   
Target Milestone: 13.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Sebastian Pahnke CLA 2016-10-29 07:23:41 EDT
Consider the tern-project file below. If you use it as is, the content assist works fine. However, if you include the .json extension, a JavaScript exception is thrown, because the file is not found. The reason is a typo in a RegExp in ternWorkerCore/_loadDef

/$.json/i should be /\.json$/i

tern-project:
{
	"ecmaVersion": 5,
	"libs": [".definitions/test"]
}