Skip to content

Commit

Permalink
Fix/style (#14)
Browse files Browse the repository at this point in the history
* fix style

* fix lint

* add hooks

* adding files

* update script
  • Loading branch information
jimexist authored and Chyroc-MD committed Jan 14, 2017
1 parent 36fe1e3 commit ab4384e
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 48 deletions.
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
"main": "dist/main.js",
"license": "MIT",
"description": "a simple node.js client for Sqoop 2",
"files": [
"dist/"
],
"scripts": {
"clean": "rimraf .nyc_output coverage dist",
"prebuild": "npm run lint",
"build": "babel -d dist src",
"lint": "standard --verbose | snazzy",
"test": "mocha",
"precommit": "npm run lint",
"prepush": "npm run lint",
"prepublish": "npm run clean && npm run build && npm run lint",
"coverage": "nyc npm test && nyc report --reporter=text-lcov | coveralls"
},
"dependencies": {
Expand All @@ -21,6 +28,7 @@
"babel-preset-latest": "^6.16.0",
"chai": "^3.5.0",
"coveralls": "^2.11.15",
"husky": "^0.12.0",
"mocha": "^3.2.0",
"nyc": "^10.0.0",
"preset": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class Hasoop {
search: '?' + urlQuery,
pathname: urlPath
}
return url.format(urlObj);
return url.format(urlObj)
}

getVersion () {
Expand All @@ -58,4 +58,4 @@ export class Hasoop {
const url = this.formatUrl([connectorUri], connectorName)
return sendGetRequest(url)
}
}
}
8 changes: 2 additions & 6 deletions test/authorization.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/**
* Created by Chyroc on 17/1/10.
*/

import { expect } from 'chai'
/* eslint-env mocha */
import { Hasoop } from '../src/index'

const sqoopClient = new Hasoop('')
Expand All @@ -19,4 +15,4 @@ suite('authorization', () => {
test.skip('getRole', () => {
sqoopClient.getRole()
})
})
})
8 changes: 2 additions & 6 deletions test/connector.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/**
* Created by Chyroc on 17/1/10.
*/

/* eslint-env mocha */
import { expect } from 'chai'
import { sqoopClient } from './index'

Expand All @@ -16,5 +13,4 @@ suite('connector', () => {
const data = await sqoopClient.getConnectorByConnectorName(connectorName)
expect(data['connectors'][0]['name']).to.equal('generic-jdbc-connector')
})

})
})
7 changes: 2 additions & 5 deletions test/driver.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/**
* Created by Chyroc on 17/1/10.
*/

/* eslint-env mocha */
import { expect } from 'chai'
import { sqoopClient } from './index'

Expand All @@ -11,4 +8,4 @@ suite('driver', () => {
expect(data['version']).to.equal('1')
expect(data['all-config-resources']['jarConfig.label']).to.equal('Classpath configuration')
})
})
})
7 changes: 2 additions & 5 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/**
* Created by Chyroc on 17/1/10.
*/

/* eslint-env mocha */
import { Hasoop } from '../src/index'

const config = {
Expand All @@ -10,4 +7,4 @@ const config = {
'port': 12000,
'webapp': 'sqoop'
}
export const sqoopClient = new Hasoop(config)
export const sqoopClient = new Hasoop(config)
8 changes: 2 additions & 6 deletions test/job.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/**
* Created by Chyroc on 17/1/10.
*/

import { expect } from 'chai'
/* eslint-env mocha */
import { Hasoop } from '../src/index'

const sqoopClient = new Hasoop('')
Expand Down Expand Up @@ -31,4 +27,4 @@ suite('job', () => {
test.skip('stopJob', () => {
sqoopClient.stopJob()
})
})
})
8 changes: 2 additions & 6 deletions test/link.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/**
* Created by Chyroc on 17/1/10.
*/

import { expect } from 'chai'
/* eslint-env mocha */
import { Hasoop } from '../src/index'

const sqoopClient = new Hasoop('')
Expand All @@ -23,4 +19,4 @@ suite('link', () => {
test.skip('getLink', () => {
sqoopClient.getLink()
})
})
})
9 changes: 2 additions & 7 deletions test/submission.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/**
* Created by Chyroc on 17/1/10.
*/

import { expect } from 'chai'
/* eslint-env mocha */
import { Hasoop } from '../src/index'

const sqoopClient = new Hasoop('')
Expand All @@ -11,5 +7,4 @@ suite('submission', () => {
test.skip('getSubmission', () => {
sqoopClient.getSubmission()
})

})
})
7 changes: 2 additions & 5 deletions test/version.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/**
* Created by Chyroc on 17/1/10.
*/

/* eslint-env mocha */
import { expect } from 'chai'
import { sqoopClient } from './index'

Expand All @@ -11,4 +8,4 @@ suite('utils', () => {
expect(data).to.be.an('object')
expect(data['api-versions'][0]).to.equal('v1')
})
})
})
26 changes: 26 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,10 @@ chokidar@^1.0.0:
optionalDependencies:
fsevents "^1.0.0"

ci-info@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534"

circular-json@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d"
Expand Down Expand Up @@ -1243,6 +1247,10 @@ find-cache-dir@^0.1.1:
mkdirp "^0.5.1"
pkg-dir "^1.0.0"

find-parent-dir@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54"

find-root@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.0.0.tgz#962ff211aab25c6520feeeb8d6287f8f6e95807a"
Expand Down Expand Up @@ -1507,6 +1515,14 @@ http-signature@~1.1.0:
jsprim "^1.2.2"
sshpk "^1.7.0"

husky@^0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/husky/-/husky-0.12.0.tgz#3a44922fce8071803242c3c7522a6582c50525dc"
dependencies:
find-parent-dir "^0.3.0"
is-ci "^1.0.9"
normalize-path "^1.0.0"

iconv-lite@~0.4.13:
version "0.4.15"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb"
Expand Down Expand Up @@ -1586,6 +1602,12 @@ is-builtin-module@^1.0.0:
dependencies:
builtin-modules "^1.0.0"

is-ci@^1.0.9:
version "1.0.10"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e"
dependencies:
ci-info "^1.0.0"

is-dotfile@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d"
Expand Down Expand Up @@ -2079,6 +2101,10 @@ normalize-package-data@^2.3.2:
semver "2 || 3 || 4 || 5"
validate-npm-package-license "^3.0.1"

normalize-path@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379"

normalize-path@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a"
Expand Down

0 comments on commit ab4384e

Please sign in to comment.