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

Bug 512193

Summary: Update linting to handle simplified CommonJS statements
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: JS ToolsAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: steve_northover
Version: 13.0   
Target Milestone: 14.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Curtis Windatt CLA 2017-02-14 12:32:14 EST
This is an extension of Bug 511317 where we had problems loading dependent modules when using simplified CommonJS statements

define(function(require, exports, modules){ })

We now load the modules and can provide accurate content assist, but a lot of the linting rules give conflicting messages about running AMD, commonjs, adding eslint-env directives, etc.  This bug is to capture the linting rule fixes and will also have a new test suite for them.
Comment 1 Curtis Windatt CLA 2017-02-14 12:37:06 EST
Quick list of the lint problems:
1) We should always suggest starting the RequireJS plugin, not Common JS
2) We should not warn if a module name is known to exist (happens due to paths with slashes meaning something different in CommonJS vs RequireJS).
3) We should warn if a module name can't be found. (See Steve's comment Bug 511317#8.
4) We should avoid putting problems on the require/modules/exports params about shadowing.