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

Bug 496663

Summary: Support the new ways to set problem severity for ESlint (was: .eclintrc does not seem to be working for unused paramters (or at all?))
Product: [ECD] Orion Reporter: Steve Northover <steve_northover>
Component: JS ToolsAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, Michael_Rennie, Olivier_Thomann
Version: 12.0   
Target Milestone: 13.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 496027    
Bug Blocks:    

Description Steve Northover CLA 2016-06-23 11:13:59 EDT
1) get the space example code
2) add this .eslintrc file

{
   "rules": {
        "no-unused-vars": ["error", { "vars": "all", "args": "after-used" }]
    }
}

3) click on space.js
4) BUG: You should get an error for main and mouseDown never used
Comment 1 Michael Rennie CLA 2016-06-23 14:06:31 EDT
Originally I was going to say "you need a number for severity", but according to the docs, you can now use prose in the file and in the directives.

We need to support this.
Comment 2 Michael Rennie CLA 2016-06-23 14:07:35 EDT
The doc link showing both numbers and prose:

http://eslint.org/docs/user-guide/configuring#configuring-rules
Comment 3 Michael Rennie CLA 2016-06-23 14:31:16 EDT
This will likely be a dupe / fixed in bug 496027. Until we confirm my suspicion, I'll mark it depends on.
Comment 4 Olivier Thomann CLA 2016-08-19 10:35:06 EDT
We should update the implementation for the no-unused-vars rule. They added a lot of new arguments that we don't support. So fixing the bug 496027 will fix the issue with the severity being a string instead of an number, but it won't fix the way the rule is behaving.
Comment 5 Olivier Thomann CLA 2016-08-22 11:22:22 EDT
Closing as a dup of bug 496027.
Issues with the "no-unused-vars" will be handled as part of bug 499998.
Now "error" is a valid severity.