Skip to content

Commit 8d6d227

Browse files
committed
[eslint config] [*] [tests] Even though the base config may not be up 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)
1 parent 638b312 commit 8d6d227

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ before_install:
1212
- 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g [email protected] ;; 2.*) npm install -g npm@2 ;; esac ; fi'
1313
- 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi'
1414
script:
15-
- 'npm test'
15+
- 'npm run travis'
1616
sudo: false
1717
matrix:
1818
fast_finish: true

package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
"description": "A mostly reasonable approach to JavaScript.",
55
"scripts": {
66
"preinstall": "npm run install:config && npm run install:config:base",
7-
"install:config": "cd packages/eslint-config-airbnb && npm install && npm install ../eslint-config-airbnb-base",
8-
"install:config:base": "cd packages/eslint-config-airbnb-base && npm install",
7+
"install:config": "cd packages/eslint-config-airbnb && npm prune && npm install",
8+
"install:config:base": "cd packages/eslint-config-airbnb-base && npm prune && npm install",
99
"test": "npm run --silent test:config && npm run --silent test:config:base",
1010
"test:config": "cd packages/eslint-config-airbnb; npm test",
11-
"test:config:base": "cd packages/eslint-config-airbnb-base; npm test"
11+
"test:config:base": "cd packages/eslint-config-airbnb-base; npm test",
12+
"travis": "npm run --silent travis:config && npm run --silent travis:config:base",
13+
"travis:config": "cd packages/eslint-config-airbnb; npm run travis",
14+
"travis:config:base": "cd packages/eslint-config-airbnb-base; npm run travis"
1215
},
1316
"repository": {
1417
"type": "git",

packages/eslint-config-airbnb-base/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"lint": "eslint .",
88
"tests-only": "babel-tape-runner ./test/test-*.js",
99
"pretest": "eslint-find-rules --unused",
10-
"test": "npm run --silent lint && npm run --silent tests-only"
10+
"test": "npm run --silent lint && npm run --silent tests-only",
11+
"travis": "npm run --silent test"
1112
},
1213
"repository": {
1314
"type": "git",

packages/eslint-config-airbnb/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"lint": "eslint .",
88
"tests-only": "babel-tape-runner ./test/test-*.js",
99
"pretest": "eslint-find-rules --unused",
10-
"test": "npm run --silent lint && npm run --silent tests-only"
10+
"test": "npm run --silent lint && npm run --silent tests-only",
11+
"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 &"
1112
},
1213
"repository": {
1314
"type": "git",

0 commit comments

Comments
 (0)