Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Commit

Permalink
Switch to @uber/eslint-config
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdeandrade committed Jun 24, 2016
1 parent a32862d commit 7c65af9
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 17 deletions.
1 change: 1 addition & 0 deletions .eslintignore
@@ -0,0 +1 @@
coverage/
20 changes: 17 additions & 3 deletions .eslintrc
@@ -1,5 +1,19 @@
{
"rules": {
"max-statements": [2, 25]
}
"extends": [
"@uber/eslint-config"
],

"rules": {
"block-scoped-var": 0,
"callback-return": 0,
"consistent-return": 0,
"indent": ["error", 4, { "SwitchCase": 1 }],
"max-statements": [2, 25],
"no-else-return": 0,
"no-implicit-coercion": 0,
"no-inline-comments": 0,
"no-invalid-this": 0,
"no-shadow": 0,
"no-unneeded-ternary": 0
}
}
4 changes: 2 additions & 2 deletions bin/idl-daemon.js
Expand Up @@ -36,7 +36,7 @@ var util = require('util');

var Repository = require('../repository.js');

/*eslint no-process-env: 0*/
/* eslint no-process-env: 0 */
var HOME = process.env.HOME;

module.exports = IDLDaemon;
Expand All @@ -56,7 +56,7 @@ function main() {
});
}

/*eslint no-console: 0, no-process-exit: 0 */
/* eslint no-console: 0, no-process-exit: 0 */
function IDLDaemon(opts) {
if (!(this instanceof IDLDaemon)) {
return new IDLDaemon(opts);
Expand Down
8 changes: 4 additions & 4 deletions bin/idl.js
Expand Up @@ -80,10 +80,10 @@ var minimistOpts = {
}
};

/*eslint no-process-env: 0*/
/* eslint no-process-env: 0 */
var HOME = process.env.HOME;

/*eslint no-console: 0, no-process-exit:0 */
/* eslint no-console: 0, no-process-exit:0 */
module.exports = IDL;

function main() {
Expand Down Expand Up @@ -277,7 +277,7 @@ IDL.exec = function exec(string, options, cb) {
};

function help(helpUrl, cb) {
/*eslint-disable max-len*/
/* eslint-disable max-len */
var helpText = [
'usage: idl --repository=<repo> [--help] [-h]',
' <command> <args>',
Expand All @@ -304,7 +304,7 @@ function help(helpUrl, cb) {

helpText = helpText.join('\n');

/*eslint-enable max-len*/
/* eslint-enable max-len */
setImmediate(cb.bind(this, null, helpText));
}

Expand Down
2 changes: 1 addition & 1 deletion git-process.js
Expand Up @@ -19,7 +19,7 @@
// THE SOFTWARE.

'use strict';
/*eslint-disable no-console*/
/* eslint-disable no-console */
var assert = require('assert');
var spawn = require('child_process').spawn;
var console = require('console');
Expand Down
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -47,15 +47,16 @@
"xtend": "4.0.0"
},
"devDependencies": {
"@uber/eslint-config": "^3.0.1",
"eslint": "2.13.1",
"fixtures-fs": "2.0.0",
"istanbul": "^0.3.5",
"opn": "^1.0.1",
"tape": "^3.4.0",
"tape-cluster": "2.0.0",
"time-mock": "0.1.2",
"timekeeper": "0.0.5",
"uber-licence": "^1.5.1",
"uber-standard": "3.6.4"
"uber-licence": "^1.5.1"
},
"licenses": [
{
Expand All @@ -67,7 +68,7 @@
"add-licence": "uber-licence",
"test": "npm run lint -s && npm run cover -s",
"unit-test": "node test/index.js",
"lint": "standard -v",
"lint": "eslint . --config .eslintrc",
"cover": "istanbul cover --report html --print detail -- test/index.js && npm run check-cover -s",
"check-cover": "istanbul check-coverage --branches=100 --lines=100 --functions=100 || echo 'coverage failed'",
"view-cover": "opn ./coverage/index.html",
Expand Down
11 changes: 7 additions & 4 deletions test/unit/get-dependencies.js
Expand Up @@ -71,8 +71,11 @@ var fixtures = {

test('getServiceDependenciesFromIncludes',
withFixtures(fixturesPath, fixtures, function t(assert) {
getDependencies(
path.resolve(__dirname, '../fixtures/idl/github.com/a-team/foo'),
getDependencies(
path.resolve(__dirname, '../fixtures/idl/github.com/a-team/foo'),
onIncludes
);

function onIncludes(err, serviceDependencies) {
if (err) {
assert.ifError(err);
Expand All @@ -89,5 +92,5 @@ test('getServiceDependenciesFromIncludes',

assert.end();
}
);
}));
})
);

0 comments on commit 7c65af9

Please sign in to comment.