Most of the rules in the import plugin are only useful for projects
using purely ES6 imports. The `no-unresolved` rule works with mixed
CommonJS and ES6 though, so we at least benefit from that in the
meantime.
Unused expressions are generally a mistake, as they don't do anything.
The exceptions to this rule (short-circuit expressions and ternary
expressions) have been allowed.
The `webrtc-adapter` was previously ignored by eslint because it has a
side-effect upon being imported. I removed the local variable instead,
which should preserve the same side-effect without making eslint
complain.
While working on #6805, I noticed that many variables were being used
before they were declared. Technically this worked fine in practice
because we were using the `transform-es2015-block-scoping` Babel plugin,
which transforms `let` and `const` to `var`, which is hoisted. However,
after removing that Babel transformation, many things broke.
All instances of variables or classes being used before declared have
been fixed.
The `no-use-before-define` eslint rule has been added to catch these
cases going forward. The rule is disabled for function declarations for
the moment, because those are always hoisted. We could disable that too
if we want to, but it's purely stylistic and would require a lot more
changes.
* eslint: Check for unused function arguments
* eslint: Ignore unused '_' in argument list
Also allow any number of '_' e.g., '__' or '___' which is to be used sparingly
* Remove and rename unused arguments
* Add mozilla plugin key to manifest
* Move all chrome references into platform-checking module
Addresses #453
* Add chrome global back to linter blacklist
* Add tests