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

Bug 493373

Summary: Using eslint-enable comments doesn't seem to enable the corresponding rule
Product: [ECD] Orion Reporter: Olivier Thomann <Olivier_Thomann>
Component: JS ToolsAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, Michael_Rennie
Version: 11.0   
Target Milestone: 12.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Olivier Thomann CLA 2016-05-10 13:18:26 EDT
I tried to add /* eslint-enable missing-doc */ to enable the missing-doc rule for a specific file and it looks like the rule was never run.
eslint-enable directive is a way to easily enable a rule for a specific file. Also eslint-disable can be used to disable a rule.
Comment 1 Olivier Thomann CLA 2016-05-11 09:49:37 EDT
After investigation, it looks like this works as expected. /* eslint-enable ...*/ should be used to enable again a rule that has been disabled using /* eslint-disable....*/.Naively I was expecting that /* eslint-enable ... */ located at the top of the file would enable for following rules.
Michael, I think I could get that working, but this is controlled inside eslint code so we would need to merge it every time we move to a new version of eslint.
Comment 2 Michael Rennie CLA 2016-05-11 12:16:11 EDT
(In reply to Olivier Thomann from comment #1)
> After investigation, it looks like this works as expected. /* eslint-enable
> ...*/ should be used to enable again a rule that has been disabled using /*
> eslint-disable....*/.Naively I was expecting that /* eslint-enable ... */
> located at the top of the file would enable for following rules.
> Michael, I think I could get that working, but this is controlled inside
> eslint code so we would need to merge it every time we move to a new version
> of eslint.

We should not change eslint for this - its best if we keep eslint as close to upstream as possible.

My vote would be wontfix.
Comment 3 Olivier Thomann CLA 2016-05-11 12:51:29 EDT
Ok, closing as INVALID.