Skip to content

Commit

Permalink
[eslint config] [*] [tests] Even though the base config may not be up…
Browse files Browse the repository at this point in the history
… to date in the main package, let’s `npm link` the base package into the main one for the sake of travis-ci tests.

(Followup from c7faa91)
  • Loading branch information
ljharb committed May 16, 2016
1 parent 638b312 commit 8d6d227
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -12,7 +12,7 @@ before_install:
- 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
- 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi'
script:
- 'npm test'
- 'npm run travis'
sudo: false
matrix:
fast_finish: true
Expand Down
9 changes: 6 additions & 3 deletions package.json
Expand Up @@ -4,11 +4,14 @@
"description": "A mostly reasonable approach to JavaScript.",
"scripts": {
"preinstall": "npm run install:config && npm run install:config:base",
"install:config": "cd packages/eslint-config-airbnb && npm install && npm install ../eslint-config-airbnb-base",
"install:config:base": "cd packages/eslint-config-airbnb-base && npm install",
"install:config": "cd packages/eslint-config-airbnb && npm prune && npm install",
"install:config:base": "cd packages/eslint-config-airbnb-base && npm prune && npm install",
"test": "npm run --silent test:config && npm run --silent test:config:base",
"test:config": "cd packages/eslint-config-airbnb; npm test",
"test:config:base": "cd packages/eslint-config-airbnb-base; npm test"
"test:config:base": "cd packages/eslint-config-airbnb-base; npm test",
"travis": "npm run --silent travis:config && npm run --silent travis:config:base",
"travis:config": "cd packages/eslint-config-airbnb; npm run travis",
"travis:config:base": "cd packages/eslint-config-airbnb-base; npm run travis"
},
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-config-airbnb-base/package.json
Expand Up @@ -7,7 +7,8 @@
"lint": "eslint .",
"tests-only": "babel-tape-runner ./test/test-*.js",
"pretest": "eslint-find-rules --unused",
"test": "npm run --silent lint && npm run --silent tests-only"
"test": "npm run --silent lint && npm run --silent tests-only",
"travis": "npm run --silent test"
},
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-config-airbnb/package.json
Expand Up @@ -7,7 +7,8 @@
"lint": "eslint .",
"tests-only": "babel-tape-runner ./test/test-*.js",
"pretest": "eslint-find-rules --unused",
"test": "npm run --silent lint && npm run --silent tests-only"
"test": "npm run --silent lint && npm run --silent tests-only",
"travis": "cd ../eslint-config-airbnb-base && npm link && cd - && npm link eslint-config-airbnb-base && npm run --silent test ; npm unlink eslint-config-airbnb-base >/dev/null &"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 8d6d227

Please sign in to comment.