Commit Graph
8 Commits
Author SHA1 Message Date
Matt Godbolt f68198af9e Reassign copyright to Compiler Explorer Authors (#2233) 2020-09-26 17:50:40 -05:00
Austin Morton 044dcfbf88 Use ES6 Modules (#2132) 2020-09-26 16:59:26 -04:00
Rubén Rincón BlancoandAustin Morton ccff4b9ee5 Add new eslint rules (#2121)
The largest changes here are:
- enforcing single quotes for strings
- enforcing trailing commas where possible

In addition to those we have enabled several eslint plugins:
- plugin:requirejs/recommended, to enforce some conventions in require statements
- plugin:node/recommended, to enforce correct usage of various node.js APIs
- plugin:unicorn/recommended, which contains a pretty mixed bag of useful rules

This PR attempts to not change code behavior when possible.  In cases where fixing
existing code would change semantics, a linting exclusion has been placed in the 
code base to silence the error.  You can find these by searching for `eslint-disable-next-line`.

Co-authored-by: Austin Morton <austinpmorton@gmail.com>
2020-08-04 16:39:02 -04:00
Matt Godbolt fdab41d966 Use res.send() in most cases.
I discovered res.send() will set cache control headers, content-size,
and content-type, and will to-json objects (setting type to app/json).
Refactored a few things, hit an issue where testing chai http doesn't
seem to want to remember the data (in health check tests); reading the
chai http docs I don't actually think it's supported. Was working by
fluke before.

Took the opportunity to use a few "extract method" in the IDE too to
remove duplicated code (that the IDE was also nagging me about...)
2020-01-13 07:29:08 -06:00
RabsRincon 6ef87b5ef9 Fix copyright dates and normalize text 2018-02-27 14:58:21 +01:00
RabsRincon 670afd8921 Move to ESLint
Somewhat compilant!
2018-02-13 14:49:07 +01:00
RabsRincon fc75208dac New year, new date 2018-01-01 16:44:04 +01:00
Matt Godbolt 22c87055fe Extract source handler 2017-12-21 10:58:24 -06:00