Skip to content

Commit

Permalink
style: move eslint rules to .eslintrc
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-koval committed Jan 22, 2018
1 parent 7d34d0f commit e109ddd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"no-console": "off",
"max-len": "off",
"no-debugger": "warn",
"consistent-this": "off",
"camelcase": "off",
"complexity": "warn"
}
}
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const { isURL } = require('validator');

const { UnexpectedStatusCodeError, TrembitaError } = require('./error');


const Trembita = class Trembita {
constructor(options) {
this.raw = options => this.client(options).then(Trembita._validateExpectedCodes.bind(options))
Expand Down Expand Up @@ -45,8 +44,8 @@ const Trembita = class Trembita {
if (typeof endpoint !== 'string') { throw new TrembitaError('endpoint is not string'); }
if (!isURL(endpoint, {
protocols: ['http', 'https'],
require_protocol: true, // eslint-disable-line camelcase
require_host: true, // eslint-disable-line camelcase
require_protocol: true,
require_host: true,
})) { throw new TrembitaError('endpoint is not valid url') }
}

Expand All @@ -57,7 +56,7 @@ const Trembita = class Trembita {
* @param {Object} body res.body
* @return {Promise}
*/
static _validateExpectedCodes ({statusCode, body}) {
static _validateExpectedCodes ({ statusCode, body }) {
const options = this;
const defaultStatusCodes = [200, 201];

Expand Down

0 comments on commit e109ddd

Please sign in to comment.