Node.js code is written more & more commonly in ES6+ so it doesn't make sense
to enable it there. There are many violations in test code so it's disabled
there as well.
Closes gh-4615
(cherry picked from commit 4a7fc8544e)
While we have absolutely no style-related expectations to our minified file,
we do care that it's valid ES 5.1. This is now verified.
Also, update grunt-eslint as a newer ESLint version is required to be able
to use "extends" inside of the "overrides" section.
Fixes gh-3075
Closes gh-4594
Ref gh-4598
This commit requires all function parameters to be used, not just the last one.
In cases where that's not possible as we need to match an external API, there's
an escape hatch of prefixing an unused argument with `_`.
This change makes it easier to catch unused AMD dependencies and unused
parameters in internal functions the API of which we may change at will, among
other things.
Unused AMD dependencies have been removed as part of this commit.
Closes gh-4381
(cherry-picked from 438b1a3e8a)
1. Use the short name of the preset in the config.
2. Run ESLint first on non-minified files.
3. Explicitly specify environments in every config file (those settings cascade
which means we've been assuming a Node.js environment where we shouldn't have).