| Age | Commit message (Collapse) | Author |
|
Worthy read: "Top ten reasons why I won’t use your open source project"
by Adam Stacoviak.
https://changelog.com/top-ten-reasons-why-i-wont-use-your-open-source-project/
|
|
It seems neku doesn't have a working HTTPS website anymore. It certainly
used to.
|
|
|
|
This also adds a mention of the IRC channel.
Worthy read: "Readme Driven Development" by Tom Preston-Werner:
http://tom.preston-werner.com/2010/08/23/readme-driven-development.html
|
|
Fixes ESLint vars-on-top errors using airbnb/legacy config.
|
|
Before this, JSCS would print an error about missing newline. This was
introduced in previous commit 24ce733.
|
|
Fixes ESLint vars-on-top errors using airbnb/legacy config.
|
|
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.
|
|
Fixes ESLint id-length errors using airbnb/legacy config. Some arguments
were also unused, so this will also avoid introducing new no-unused-vars
lint errors.
|
|
This is a symptom of copy-paste code. A file would be uploaded, but it
would return the "Something went wrong" error message without telling
why.
Me, ewhal@ and bursey on IRC tried had a look to see what was wrong, but
none of us could catch this subtle bug. It wasn't until alchimist@
(cenci0) looked at this and found the issue. Thanks.
This bug was introduced in commit 2751811.
|
|
Fixes a dead link.
|
|
Code re-use is good. The previous implementation doesn't reuse existing
text_error() functions and also forgoes using text/plain header with the
text implementation.
This fixes consistency where JSON is assumed to be the default output.
It is a common practice among APIs to default all errors to JSON, such
as the Stripe and Tumblr APIs.
|
|
The unofficial Airbnb config (eslint-config-airbnb-es5) previously
thought this to be an error and so it was removed. The official Airbnb
config (airbnb/legacy) now works just like the ES6 config (airbnb).
Fixes ESLint comma-dangle errors using airbnb/legacy config.
This reverts commit 49d58d98f5866bb9ccc9069a16d131486f04bba2.
|
|
This is something I would disagree with, because this commit in my
opinion reduces readability. I am not going to reinvent the wheel and
write for humans, because I enjoy being a slave to ESLint.
Any complaints about this commit should be directed at Airbnb to fix
their style guide. Alternatively, a documented standard style guide
should be created for pantsu.cat, extending the Airbnb config.
This fixes ESLint no-multi-spaces errors using airbnb/legacy config.
|
|
It is a little unclear what the deprecation warning wants the developer
to do. The fallthrough comment to text response may not be immediately
obvious to the reader.
This commit helps to understand the intention and to avoid bugs such as
commit daac77a.
|
|
Gyazo didn't fallthrough correctly to text, because the type would be
set to Gyazo while the Gyazo case didn't exist. PHP is so ambiguous
sometimes.
This adds the missing fallthroughs that were removed in commit e39a920.
It should now correctly fallthrough ("fallback") to text response.
|
|
While double quotes are mostly optional in implementations, some CSV
linters want double quotes for whatever the reason. Assumably, it
reduces the amount of bugs and avoids possible parsing errors. This also
has very little relevance for not trusting the user input, but better be
safe than sorry.
This commit is not very pretty. In a future commit, this issue will be
addressed with arrays and fputcsv().
|
|
RFC 4180 specifies that CSV files should use CRLF (a carriage-return and
line-feed pair, e.g. \r\n).
|
|
Prefix jQuery object variables with a $
|
|
|
|
This fixes a silly mistake where Gyazo would accidentally use the HTML
response instead of text as intended.
This bug was introduced in commit 2ca5b6b.
|
|
This commit improves readability and compliments commit 6d8b204.
|
|
This commit improves readability.
|
|
Let's say some user decides to use output "xml". Unexpectedly, the user
would instead receive JSON output. This is undefined behavior in its own
way and violates the principle of least surprise.
Problems could arise if we added "xml" later with actual application/xml
or text/xml content.
Right now upload.php overrides an empty output argument to json instead,
so this seems safe to do. Any non-existent output will now return a 400
Bad Request error.
|
|
This commit improves readability by swapping text and html response
source line order for alphabetical sorting.
|
|
This restores the typical sorting order:
- csv
- (gyazo)
- text
- html
- default (json)
|
|
A majority of the Gyazo code is just copy-pasted text/plain protocol.
This will put an end to that insanity.
OK ewhal@
|
|
Previously, CSV would return the wrong filetype text/plain and
fallthrough.
RFC 4180 registers text/csv MIME type. RFC 7111 is closely related and
says to use text/csv to launch the correct application.
|
|
Previous commit 11e9d2d forgot to add the var declaration here.
Fixes ESLint no-undef warnings using Airbnb ES5 config.
|
|
Fixes ESLint no-undef warnings using Airbnb ES5 config.
|
|
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
|
|
The loadstart even is only triggered once to indicate the progress has
begun (initialize the progress bar). Essentially, this is dead code for
two reasons:
1. It never gets emitted because initProgressBar() gets emitted first.
2. No JavaScript file in pomf core uses the non-standard uploadstart
event.
|
|
Using anonymous functions with event handlers is painfully slow
according to benchmarks. Anonymous functions are up to 99% slower.
It is also illegal to use anonymous functions in this way according to
Airbnb ES5 style guide.
Fixes some ESLint func-names errors using Airbnb ES5 config.
Reference: https://jsperf.com/event-handler-vs-anonymous-function/3
|
|
Fixes ESLint no-param-reassing warning.
|
|
This fixes Airbnb ES5 style guide violations.
|
|
Before this merge, ESLint reported about 114 problems (76 errors, 38
warnings). This merge reduces that to about 67 problems (29 errors, 38
warnings) using Airbnb ES5 config.
OK ewhal@
|
|
Until the code has been converted to ES6 in it's entirety, let's stick
to Airbnb's ES5 style guide so that ESLint won't complain.
This reverts commit e6f354a.
|
|
This newline was accidentally introduced in commit a17c446.
Fixes ESLint warning padded-blocks using Airbnb ES5 config.
|
|
Fixes ESLint radix warning using Airbnb ES5 config.
|
|
While JSCS and ESLint do not detect this yet as of today, my eyes do.
The Airbnb style guide wants to do this.
This commit doesn't prefix cabinet.js, but the next commit will while
addressing another issue.
|
|
This is a surprising one. JSHint and JSCS do not seem to mind the
previous indentation, but ESLint throws an error when using the Airbnb
style guide. The style guide itself doesn't seem to mention anything
about this directly.
What ever it is, this one pleases all three linters.
Fixes ESLint indent warnings using Airbnb ES5 config.
|
|
Fixes JSCS safeContextKeyword warnings using Airbnb preset.
|
|
Fixes JSCS disallowQuotedKeysInObjects warnings using Airbnb preset.
|
|
This adds commas to cheesesteak.js.
Something to note, the Airbnb ES5 style guide opposes a trailing comma.
The latest ES6 edition endorses adding a trailing comma, explaining it
leads to cleaner Git diffs. Endorse the ES6 standard, that's also the
Airbnb preset in JSCS.
Fixes JSCS requireTrailingComma warnings using Airbnb preset.
|
|
Airbnb says to use /** ... */ for multiline comments and // for single
line comments.
Fixes JSCS requirePaddingNewLinesBeforeLineComments and
validateIndentation warnings using Airbnb preset.
|
|
Thanks to ASI (Automatic Semicolon Insertion) in JavaScript, not using
individual var declarations can actually cause subtle bugs.
Fixes JSCS disallowMultipleVarDecl warnings using Airbnb preset.
Reference:
http://benalman.com/news/2012/05/multiple-var-statements-javascript/
|
|
Fixes JSCS validateQuoteMarks warnings using Airbnb preset.
|
|
Fixes JSCS disallowTrailingWhitespace warnings using Airbnb preset.
|
|
Fixes JSCS requirePaddingNewLinesAfterBlocks warnings using Airbnb
preset.
|
|
Fixes ESLint warning no-redeclare.
|