Skip to content

Commit 54d072b

Browse files
committed
Add package.json and run eslint checks using npm test
1 parent 2758125 commit 54d072b

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ env:
99

1010
before_script:
1111
- nvm install 4
12+
- npm install
1213

13-
script: bash ./build/travis/script.sh
14+
script:
15+
- npm test
16+
- bash ./build/travis/script.sh
1417

1518
notifications:
1619
irc:

build/travis/script.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22

33
set -x
44

5-
if [[ $RUNJOB == eslint ]]; then
6-
npm install eslint
7-
npm install --save eslint-config-wikimedia
8-
./node_modules/.bin/eslint .
9-
exit $?
10-
fi
11-
125
if [[ $RUNJOB == qunit ]]; then
136
cd lib/TestRunner
147
phantomjs runTests.phantom.js ../../tests/runTests.html

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "DataValuesJavaScript",
3+
"repository": {
4+
"type": "git",
5+
"url": "https://github.com/wmde/DataValuesJavaScript"
6+
},
7+
"license": "GPL-2.0+",
8+
"dependencies": {
9+
"jquery": "^3.2.1"
10+
},
11+
"devDependencies": {
12+
"eslint": "^3.19.0",
13+
"eslint-config-wikimedia": "0.4.0"
14+
},
15+
"scripts": {
16+
"test": "npm run eslint",
17+
"eslint": "eslint ."
18+
}
19+
}

0 commit comments

Comments
 (0)