Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 262229 Details for
Bug 495410
ESLint failed to validate this file because an error occurred: No type found at the given position.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed patch
495410.patch (text/plain), 2.15 KB, created by
Olivier Thomann
on 2016-06-03 11:33:05 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2016-06-03 11:33:05 EDT
Size:
2.15 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/load-rules-async.js b/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/load-rules-async.js >index c1b56fa..68fc309 100644 >--- a/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/load-rules-async.js >+++ b/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/load-rules-async.js >@@ -1335,9 +1335,19 @@ define([ > if (node.property && node.object && node.object.type !== 'ThisExpression'){ > if (node.parent && node.parent.type === 'CallExpression' && node.parent.callee && node.parent.callee === node){ > var tern = context.getTern(); >- var query = {end: node.property.start}; >- var expr = tern.findQueryExpr(tern.file, query); >- var type = tern.findExprType(query, tern.file, expr); >+ var query = {start: node.property.start, end: node.property.end}; >+ var type = null; >+ var expr; >+ try { >+ expr = tern.findQueryExpr(tern.file, query); >+ if (!expr) { >+ // no expression found so we cannot get the type >+ return; >+ } >+ type = tern.findExprType(query, tern.file, expr); >+ } catch(e) { >+ // ignore >+ } > if (type && type.propertyOf) { > if(type.propertyOf.props[node.property.name]) { > //if we found a type and its a direct property, quit >@@ -1349,8 +1359,16 @@ define([ > } > } > query.end = node.object.end; >- expr = tern.findQueryExpr(tern.file, query); >- type = tern.findExprType(query, tern.file, expr); >+ try { >+ expr = tern.findQueryExpr(tern.file, query); >+ if (!expr) { >+ // no expression found so we cannot get the type >+ return; >+ } >+ type = tern.findExprType(query, tern.file, expr); >+ } catch(e) { >+ // ignore >+ } > if (type && type.types && type.types.length > 0) { > for (var i = 0; i < type.types.length; i++) { > if (type.types[i].props && type.types[i].props[node.property.name]) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 495410
: 262229