Commit Graph

11 Commits

Author SHA1 Message Date
Timmy Willison
1552b93ed5
3.6.2 2022-12-13 09:56:16 -05:00
Michał Gołębiowski-Owczarek
0fdfdd8290 Build: Enable ESLint one-var rule for var declarations in browser code
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)
2020-03-02 22:30:00 +01:00
Michał Gołębiowski-Owczarek
37df5cdf4e Build: Lint the minified jQuery file as well
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
2020-01-21 14:06:42 +01:00
Michał Gołębiowski-Owczarek
d7e13f128a Build: ESLint: forbid unused function parameters
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)
2019-09-26 01:59:57 +02:00
Matan Kotler-Berkowitz
70c715822b Build: Fix comment typo
Closes gh-3747
2017-08-08 18:08:02 -04:00
Michał Gołębiowski
cbc8638c38 Build: ESLint setup improvements
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).
2016-12-19 02:07:03 +01:00
Oleg Gaidarenko
6acf4a7946 Build: .eslintrc -> .eslintrc.json
`.eslintrc` format is deprecated -
http://eslint.org/docs/user-guide/configuring#configuration-file-formats

Fixes gh-3248
Closes gh-3247
2016-08-02 21:16:20 +03:00
Oleg Gaidarenko
308e4b534b Build: Simplify Gruntfile constructions
Fixes gh-3246
2016-08-02 20:58:01 +03:00
Oleg Gaidarenko
e4fd41f8fa Build: Update eslint config and fix associated errors 2016-07-15 21:42:25 +04:00
Oleg Gaidarenko
522f546d96 Build: More ESLint related changes 2016-07-09 00:49:43 +03:00
Oleg Gaidarenko
58c6ca9822 Build: ESLint details
Use eslint pragmas, fix new errors, etc

Closes gh-3148
2016-06-11 10:41:33 +03:00