<div dir="ltr"><div>So apparently the XUL pre-processer we use for eslint doesn't support inline scripts, the errors you're seeing are from code that just wasn't being linted before. I think it would be fine for now to just add them to the ignored list but it would be good to put a bug on file to get them fixed up though.</div><div><br></div><div>As for making autofix work better, most of the rules you're hitting are in the eslint source so would need to be fixed upstream and from what I can see a lot are of the form where it is difficult to know what the correct change would be automatically.<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 19, 2019 at 11:33 AM Brian Grinstead <<a href="mailto:bgrinstead@mozilla.com">bgrinstead@mozilla.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I noticed when migrating test files from .xul->.xhtml in Bug 1579952 that the file rename causes us to start eslinting the tests. I presume this means that we aren’t linting the contents of <script> tags in XUL docs but we are in XHML. This leads to a bunch of failures (for instance, here are some failures when migrating the accessible/ folder: <a href="https://treeherder.mozilla.org/#/jobs?repo=try&revision=5a678bc958e875e4117e4118aa5d1869a8097d0d&selectedJob=267352075" rel="noreferrer" target="_blank">https://treeherder.mozilla.org/#/jobs?repo=try&revision=5a678bc958e875e4117e4118aa5d1869a8097d0d&selectedJob=267352075</a>).<br>
<br>
Most of these aren't currently fixable with `./mach eslint —fix` - we go from 32 -> 30 errors on that patch after running fix. I'm wondering if there's anything we can do here to avoid injecting manual JS changes into the process of renaming files. For instance:<br>
- could we allow --fix to work on more rules?<br>
- are there other tools that we could use to help autofix these types of errors?<br>
- should we make eslint ignore these failing files?<br>
- are we doing something special with .xul files in tree that we should also do with .xhtml?<br>
<br>
Thanks,<br>
Brian<br>
<br>
_______________________________________________<br>
firefox-dev mailing list<br>
<a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/firefox-dev" rel="noreferrer" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a><br>
</blockquote></div>