| Age | Commit message (Collapse) | Author |
|
Lint our spaghetti JavaScript code to be at least slightly more
readable. Configuration used is ESLint 1.7.x and airbnb/legacy.
It's been so long I cannot remember every change that was done, but long
story short: all the ESLint errors are now gone, at least at the date of
last commit.
moep contributed some ideas for patches: some were implemented, some
were discarded as the time and patience for merging this ran out. Thus,
there are still ESLint warnings about anonymous functions.
I don't feel like spending much more time on this. The future Pomf 2.1
development branch will replace the JavaScript code in its entirety,
courtesy of luminarys@.
Suggested-by: moep
Tested-by: Eliot Whalan <ewhal@pantsu.cat>
OK ewhal@, maybe a vague OK from luminarys@ a long time ago
|
|
Very short identifier names usually make the code harder to read and
potentially less maintainable.
Fixes two ESLint id-length errors using airbnb/legacy config.
Suggested-by: avail <avail@pomf.se>
|
|
JSHint is "deprecated" in favor of ESLint. Personally I have not used
JSHint ever since switching to ESLint.
Vague OK from ewhal@
|
|
Fixes ESLint id-length errors using airbnb/legacy config. Variable "i"
is ignored as an exception.
I've also avoided creating new errors with these changes, so this also
fixes some no-unused-vars and avoids creating vars-on-top errors.
|
|
Prefix jQuery object variables with a $
|
|
|
|
Airbnb style guide recommends checking booleans this way or using
(!!window.FormData). The latter is more confusing for many.
While !! is indeed 0.2% faster than Boolean(), it's called
micro-optimization. There is no noticeable difference to the user in our
use scenario and I prefer more readable code any day.
Fixes ESLint no-undefined warning using Airbnb ES5 config.
Reference: https://jsperf.com/boolean-conversion-speed
|
|
Fixes ESLint no-param-reassing warning.
|
|
This fixes Airbnb ES5 style guide violations.
|
|
Fixes JSCS requirePaddingNewLinesAfterBlocks warnings using Airbnb
preset.
|
|
|
|
Adds curly braces and semicolons. Also change indentation to two spaces.
|
|
|
|
|