| Summary: | Initialize tooling by default for common environments (browser, node, etc.) | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Steve Northover <snorthov> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | kuschel, Silenio_Quarti |
| Version: | unspecified | ||
| Target Milestone: | 14.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | 2017-02-24 | ||
|
Description
Steve Northover
If we can find config files (ie. package.json), then we should use them to configure the environment. If we can't find files, we should assume that the editor is being used for Node and Browser development. I pushed part one of the new support (plus a new testsuite for it) to: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=edb7ad23180184973f461241a61dffa5f664da1b It reduces the number of linting problems that show up, by bringing together all the env infos from eslint files, .tern-project files and package.json. It also assumes that by default browser and node are in use. The remaining work: 1. Decide if we should change the defaults for loading tern to include node and browser 2. bring in the metadata from the AST where available to further augment the env 3. provide some way to show all the computed infos for the JS project on the project explorer UI - so if a user clicks the project folder they can see its a JS project and all the info we think we know about it 4. ensure that in all scenarios we still nag the user to add missing plugins to the .tern-project file to make sure they get the correct content assist / tooling support. For example, having a package.json file makes us assume you are working in node and does not report that 'require' is undefined (GOOD). The problem with this is that the content assist / nav / etc for node comes from the node Tern plugin - so we have to make sure we still alert the user to this fact and allow them to fix it. Second part: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=752a6e09e703a42b77f254d34df31bcd822979ef This commit adds in support: 1. to auto-configure dependencies from package.json 2. pass along computed env infos to all services 3. use the new computed env support in the ternProjectManager I opened bug 512516 and bug 512517 to track the follow up work rather than keep this one open, since the main focus of the bug has been fixed (auto configure the settings based on env) |