Skip to content

Commit

Permalink
Eslint 2.x to 3.13.0
Browse files Browse the repository at this point in the history
Signed-off-by: klimashkin <[email protected]>
  • Loading branch information
klimashkin committed Jan 6, 2017
1 parent 65bb023 commit 10eac0d
Show file tree
Hide file tree
Showing 45 changed files with 1,470 additions and 641 deletions.
505 changes: 453 additions & 52 deletions .eslintrc.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
'use strict'; // eslint-disable-line strict

module.exports = function (grunt) {
require('./bin/run');
Expand Down Expand Up @@ -84,7 +84,7 @@ module.exports = function (grunt) {
baseurl: {
options: {
replacements: [
{pattern: /__=__/ig, replacement: `__=${hash}`}
{ pattern: /__=__/ig, replacement: `__=${hash}` }
]
},
files: {
Expand Down
6 changes: 3 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ export async function configure(startStamp) {
followRedirect: false,
timeout: 1500
})
.on('response', function(response) {
.on('response', function (response) {
if (response.statusCode === 303) { // 303 means ok, user can get protected file
return prServeMiddleware(req, res, next);
}
next();
})
.on('error', function(err) {
.on('error', function (err) {
logger.warn('Downloader server request error:', err.message);
next();
});
Expand Down Expand Up @@ -295,4 +295,4 @@ export async function configure(startStamp) {

scheduleMemInfo(startStamp - Date.now());
});
};
}
4 changes: 2 additions & 2 deletions app/errors/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class ApplicationError extends Error {
Error.captureStackTrace(this, this.constructor);
} else {
// Firefox workaround
let { stack } = new Error;
let { stack } = new Error();

if (stack) {
// Skipping first line in stack (it's the line where we have create our `new Error`)
Expand All @@ -47,7 +47,7 @@ export default class ApplicationError extends Error {
const [, fileName, lineNumber, columnNumber] = FIREFOX_ERROR_INFO.exec(stack[0] || '') || [];

this.stack = stack.join('\n');
this.fileName = fileName ? fileName : undefined;
this.fileName = fileName || undefined;
this.lineNumber = lineNumber ? Number(lineNumber) : undefined;
this.columnNumber = columnNumber ? Number(columnNumber) : undefined;
}
Expand Down
16 changes: 8 additions & 8 deletions app/errors/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export {default as ApplicationError} from './Application';
export {default as AuthenticationError} from './Authentication';
export {default as AuthorizationError} from './Authorization';
export {default as BadParamsError} from './BadParams';
export {default as InputError} from './Input';
export {default as NotFoundError} from './NotFound';
export {default as NoticeError} from './Notice';
export {default as TimeoutError} from './Timeout';
export { default as ApplicationError } from './Application';
export { default as AuthenticationError } from './Authentication';
export { default as AuthorizationError } from './Authorization';
export { default as BadParamsError } from './BadParams';
export { default as InputError } from './Input';
export { default as NotFoundError } from './NotFound';
export { default as NoticeError } from './Notice';
export { default as TimeoutError } from './Timeout';
26 changes: 13 additions & 13 deletions app/webapi/methods.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export {default as auth} from '../../controllers/auth';
export {default as admin} from '../../controllers/admin';
export {default as index} from '../../controllers/index';
export {default as photo} from '../../controllers/photo';
export {default as reason} from '../../controllers/reason';
export {default as region} from '../../controllers/region';
export {default as subscr} from '../../controllers/subscr';
export {default as profile} from '../../controllers/profile';
export {default as comment} from '../../controllers/comment';
export {default as cluster} from '../../controllers/cluster';
export {default as session} from '../../controllers/_session';
export {default as settings} from '../../controllers/settings';
export {default as converter} from '../../controllers/converter';
export { default as auth } from '../../controllers/auth';
export { default as admin } from '../../controllers/admin';
export { default as index } from '../../controllers/index';
export { default as photo } from '../../controllers/photo';
export { default as reason } from '../../controllers/reason';
export { default as region } from '../../controllers/region';
export { default as subscr } from '../../controllers/subscr';
export { default as profile } from '../../controllers/profile';
export { default as comment } from '../../controllers/comment';
export { default as cluster } from '../../controllers/cluster';
export { default as session } from '../../controllers/_session';
export { default as settings } from '../../controllers/settings';
export { default as converter } from '../../controllers/converter';
2 changes: 1 addition & 1 deletion babel/server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {

// Stage-3 preset
'transform-async-generator-functions',
['transform-object-rest-spread', {useBuiltIns: true}], // useBuiltIns means Object.assign instead of babel extends helper
['transform-object-rest-spread', { useBuiltIns: true }], // useBuiltIns means Object.assign instead of babel extends helper

// ES2017
'syntax-trailing-function-commas',
Expand Down
Loading

0 comments on commit 10eac0d

Please sign in to comment.