Skip to content

Commit

Permalink
Use shared eslint config (tophat#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
msrose authored Nov 22, 2018
1 parent 13f7511 commit 4d65283
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 24 deletions.
25 changes: 3 additions & 22 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
{
"plugins": ["prettier"],
"extends": [
"airbnb/base",
"prettier"
],
"env": {
"browser": false,
"node": true,
"jest": true,
"es6": true
},
"rules": {
"prettier/prettier": [
2,
{
"bracketSpacing": true,
"semi": false,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "all"
}
]
}
"@tophat",
"@tophat/eslint-config/jest"
]
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"devDependencies": {
"@babel/core": "^7.0.0-beta.51",
"@babel/preset-env": "^7.0.0-beta.51",
"@tophat/eslint-config": "^0.1.4",
"all-contributors-cli": "^5.4.1",
"babel-loader": "^8.0.0-beta.3",
"codecov": "^3.0.2",
Expand All @@ -42,6 +43,7 @@
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^3.3.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jest": "^22.0.0",
"eslint-plugin-prettier": "^3.0.0",
"husky": "^1.2.0",
"jest": "^23.1.0",
Expand Down
1 change: 1 addition & 0 deletions test/commands/exec.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const exec = require('../../src/yvm-exec')
const { getExtractionPath, versionRootPath } = require('../../src/util/utils')

// TODO implement tests here once the "strict mode" stuff works on jest (ie require(yarn cli.js) fails)
// eslint-disable-next-line jest/no-disabled-tests
describe.skip('yvm exec', () => {
const rootPath = '/tmp/yvmExec'

Expand Down
1 change: 0 additions & 1 deletion test/commands/list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ describe('yvm list', () => {
garbageInDirectory.forEach(item => {
expect(listOutput.indexOf(item)).toBe(-1)
})
expect(listOutput.indexOf(garbageInDirectory))
})
})
2 changes: 1 addition & 1 deletion test/commands/which.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const which = require('../../src/commands/which')

describe.only('yvm which command', () => {
describe('yvm which command', () => {
it('fails to find yarn version', () => {
const path = '/Users/tophat/.nvm/versions/node/v6.11.5/bin:'
expect(which(path)).toBe(2)
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,10 @@
dependencies:
any-observable "^0.3.0"

"@tophat/eslint-config@^0.1.4":
version "0.1.4"
resolved "https://registry.yarnpkg.com/@tophat/eslint-config/-/eslint-config-0.1.4.tgz#10a22f1dfbec1bec30da250c1c89efde159d121a"

"@webassemblyjs/[email protected]":
version "1.5.12"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.5.12.tgz#a9acbcb3f25333c4edfa1fdf3186b1ccf64e6664"
Expand Down Expand Up @@ -2144,6 +2148,10 @@ eslint-plugin-import@^2.12.0:
read-pkg-up "^2.0.0"
resolve "^1.6.0"

eslint-plugin-jest@^22.0.0:
version "22.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.0.0.tgz#87dc52bbdd47f37f23bf2b10bb8469458bb3ed68"

eslint-plugin-prettier@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.0.0.tgz#f6b823e065f8c36529918cdb766d7a0e975ec30c"
Expand Down

0 comments on commit 4d65283

Please sign in to comment.