Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Commit

Permalink
[Tests] add eslint; run more travis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Feb 11, 2019
1 parent 48eb8fa commit 456b63c
Show file tree
Hide file tree
Showing 4 changed files with 626 additions and 13 deletions.
17 changes: 17 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"root": true,
"parserOptions": {
"ecmaVersion": 5,
},
"overrides": [
{
"files": "**/__tests__/**/*",
"parserOptions": {
"ecmaVersion": "2019",
"ecmaFeatures": {
"jsx": true,
}
},
},
],
}
20 changes: 16 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
language: node_js
node_js: "node"
os:
- linux
node_js:
- "11"
- "10"
- "8"
- "6"
cache:
directories:
- "node_modules"
notifications:
email: false
branches:
only:
- master
matrix:
fast_finish: true
include:
- node_js: "lts/*"
env: PRETEST=true
script:
- 'if [ -n "${PRETEST-}" ]; then yarn run pretest ; fi'
- 'if [ -n "${TEST-}" ]; then yarn run tests-only ; fi'
sudo: false
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
"react-is": "^16.8.1"
},
"scripts": {
"test": "jest",
"pretest": "npm run lint",
"lint": "eslint .",
"test": "npm run tests-only",
"tests-only": "jest",
"umd": "NODE_ENV=development browserify index.js -t loose-envify --standalone PropTypes -o prop-types.js",
"umd-min": "NODE_ENV=production browserify index.js -t loose-envify -t uglifyify --standalone PropTypes -p bundle-collapser/plugin -o | uglifyjs --compress unused,dead_code -o prop-types.min.js",
"build": "yarn umd && yarn umd-min",
Expand All @@ -40,6 +43,7 @@
"babel-preset-react": "^6.24.1",
"browserify": "^14.3.0",
"bundle-collapser": "^1.2.1",
"eslint": "^5.13.0",
"jest": "^19.0.2",
"loose-envify": "^1.4.0",
"react": "^15.5.1",
Expand Down
Loading

0 comments on commit 456b63c

Please sign in to comment.