| Summary: | [eslint] Cannot validate file due to "Unexpected string" exception | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | JS Tools | Assignee: | Mark Macdonald <mamacdon> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 5.0 | ||
| Target Milestone: | 5.0 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Smaller case: foo(['a' 'b']); ^ Note the lack of comma between parameters. And actually the provider is not throwing. It's just returning a very incomplete AST, and ESLint is throwing when it tries to analyze the scopes with escope. I've improved our error handling code when ESLint throws. It now correctly shows you the parse errors and puts another marker up informing you that the validator failed. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=44c10b7 (In reply to Mark Macdonald from comment #1) > I've improved our error handling code when ESLint throws. It now correctly > shows you the parse errors and puts another marker up informing you that the > validator failed. On second thought, maybe the ESLint error should only be shown when (if) there are no parse errors returned by esprima. It is confusing to always display what is basically an internal error. I will change this so it's only shown as a last ditch warning that why we couldn't check your code. (In reply to Mark Macdonald from comment #2) http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=cc72298 |
1. Create a .js file containing this code > /*global define*/ > define([ > 'orion/plugin' > 'stringexternalizer/nonnlsSearchUtil' > ], function (PluginProvider, NlsSearchUtil) { > }); 2. An exception is thrown by the AST provider (which should not happen), and as a result the file is not validated.