Skip to content

Commit

Permalink
Fix linting and enable cache on travis (#229)
Browse files Browse the repository at this point in the history
* Fix linting and enable cache on travis

* Add babel-core for babel-jest
  • Loading branch information
danez authored Nov 9, 2017
1 parent 118ed58 commit 3555c78
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 69 deletions.
9 changes: 5 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"parser": "babel-eslint",
"extends": "eslint:recommended",
"rules": {
"comma-dangle": [1, "always-multiline"],
"comma-dangle": ["error", "always-multiline"],
"no-underscore-dangle": 0,
"quotes": [2, "single", "avoid-escape"],
"quotes": ["error", "single", "avoid-escape"],
"strict": 0,
"no-unused-vars": 2,
"no-undef": 2
"no-unused-vars": "error",
"no-undef": "error"
},
"env": {
"node": true,
Expand Down
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@ node_js:
- "4"
- "6"
- "8"
script: npm run check
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
cache:
yarn: true
directories:
- ".eslintcache"
- "node_modules"
script: yarn test:ci
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
],
"main": "dist/main.js",
"scripts": {
"check": "npm run lint && npm run flow && npm test",
"flow": "flow",
"lint": "eslint src/",
"watch": "babel src/ --out-dir dist/ --watch",
"build": "rimraf dist/ && babel src/ --out-dir dist/ --ignore __tests__,__mocks__",
"prepublish": "npm run build",
"preversion": "npm run lint",
"test": "jest"
"lint": "eslint src/ bin/",
"prepublish": "yarn run build",
"preversion": "yarn run lint",
"test": "jest",
"test:ci": "yarn lint && yarn flow && yarn test --runInBand",
"watch": "yarn build --watch"
},
"keywords": [
"react",
Expand All @@ -42,12 +41,13 @@
"recast": "^0.12.6"
},
"devDependencies": {
"babel-cli": "^6.9.0",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^7.0.0",
"babel-jest": "^21.2.0",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-runtime": "^6.9.0",
"babel-preset-env": "^1.1.8",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
"babel-preset-flow": "^6.23.0",
"cross-spawn": "^5.0.0",
"eslint": "^4.3.0",
Expand Down
Loading

0 comments on commit 3555c78

Please sign in to comment.