| Summary: | [eslint] adding an /*eslint */ directive makes options sticky | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Michael_Rennie |
| Version: | 6.0 | ||
| Target Milestone: | 7.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | 438095 | ||
| Bug Blocks: | |||
testing with the eslint 0.6.2 branch this works as expected: adding and removing the comment causes the error to be suppressed / shown as expected. Until we actually release the eslit update and can test this more I will mark it as dependent. (In reply to Michael Rennie from comment #1) > testing with the eslint 0.6.2 branch this works as expected: > > adding and removing the comment causes the error to be suppressed / shown as > expected. > > Until we actually release the eslit update and can test this more I will > mark it as dependent. Yup, still works fine. Steps: /* eslint no-unused-params:0 */ function f(a) { console.log('nope'); } 1. change the '0' to anything not 0, save, change back, save, rise, repeat 2. remove the comment, save, put it back, save, rise, repeat |
1. Create a file containing this code, and save: (function(useless) { }()); 2. You should see an "unused parameter" warning: > Parameter 'useless' is never used. 3. Now change the code to this, and save: /*eslint no-unused-params:0*/ (function(useless) { }()); 4. The warning goes away. 5. Now remove the /*eslint */ line, and save again. I expected the warning to return, but it doesn't. It seems that options set by an /*eslint */ block remain in effect until the page is reloaded.