prettier: convert app/js decaffeinated files to Prettier format

This commit is contained in:
mserranom
2020-02-19 12:14:37 +01:00
parent 4576ef54fb
commit cffbd4e9ef
26 changed files with 3881 additions and 2639 deletions

View File

@@ -3,31 +3,36 @@
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
let ContentTypeMapper;
const Path = require('path');
let ContentTypeMapper
const Path = require('path')
// here we coerce html, css and js to text/plain,
// otherwise choose correct mime type based on file extension,
// falling back to octet-stream
module.exports = (ContentTypeMapper = {
map(path) {
switch (Path.extname(path)) {
case '.txt': case '.html': case '.js': case '.css': case '.svg':
return 'text/plain';
case '.csv':
return 'text/csv';
case '.pdf':
return 'application/pdf';
case '.png':
return 'image/png';
case '.jpg': case '.jpeg':
return 'image/jpeg';
case '.tiff':
return 'image/tiff';
case '.gif':
return 'image/gif';
default:
return 'application/octet-stream';
}
}
});
module.exports = ContentTypeMapper = {
map(path) {
switch (Path.extname(path)) {
case '.txt':
case '.html':
case '.js':
case '.css':
case '.svg':
return 'text/plain'
case '.csv':
return 'text/csv'
case '.pdf':
return 'application/pdf'
case '.png':
return 'image/png'
case '.jpg':
case '.jpeg':
return 'image/jpeg'
case '.tiff':
return 'image/tiff'
case '.gif':
return 'image/gif'
default:
return 'application/octet-stream'
}
}
}