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:
- could we allow --fix to work on more rules?
- are there other tools that we could use to help autofix these types of errors?
- should we make eslint ignore these failing files?
- are we doing something special with .xul files in tree that we should also do with .xhtml?
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.
The XUL preprocessor also disables some rules iirc. The preprocessing was added to get at least some linting there, but with xul going away we didn't want to do lots of work on it.
The best way to "fix" these is probably adding an entry to the top-level .eslintrc.js file, and disable just the rules that are failing for that directory. That way, we get the majority of rules enabled, and can work on the remaining ones (these tend to make good mentored bugs).
You'll see that there's already various directory/rule
combinations that we have disabled currently, and there's various
bugs in place to get these enabled.