Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 452296 - [quickfix] Provide quickfix to update / add eslint-env directive
Summary: [quickfix] Provide quickfix to update / add eslint-env directive
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: JS Tools (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 8.0   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 450158
Blocks:
  Show dependency tree
 
Reported: 2014-11-19 10:33 EST by Michael Rennie CLA
Modified: 2014-11-20 14:37 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2014-11-19 10:33:30 EST
Title says it all: if we are using a type from an index that eslint knows about we should propose to add / update an eslint-env directive for it.
Comment 1 Michael Rennie CLA 2014-11-19 10:38:16 EST
Mark had a good suggestion we should also offer a quick fix to offer to add an unknown var (not in a known env) to the /*global */ directive:
Comment 2 Michael Rennie CLA 2014-11-20 11:36:24 EST
Provided an initial set of fixes, which are currently disabled in-code:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=ecb4cadc027c1c30f6c6613893fd01fcad929077
Comment 3 Michael Rennie CLA 2014-11-20 14:37:58 EST
Pushed the complete working fixes and:

1. made quick fixes pluggable
2. fixed some spelling for command contributions
3. made the fixes 'smart' enough to add to the correct directive until bug 450158 is fixed