mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Use Circle CI to run lint, prettier, flow, and tests
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# Javascript Node CircleCI 2.0 configuration file
|
||||
#
|
||||
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
|
||||
#
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
# specify the version you desire here
|
||||
- image: circleci/node:7.10
|
||||
|
||||
# Specify service dependencies here if necessary
|
||||
# CircleCI maintains a library of pre-built images
|
||||
# documented at https://circleci.com/docs/2.0/circleci-images/
|
||||
# - image: circleci/mongo:3.4.4
|
||||
|
||||
working_directory: ~/repo
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
# Download and cache dependencies
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-dependencies-{{ checksum "package.json" }}
|
||||
# fallback to using the latest cache if no exact match is found
|
||||
- v1-dependencies-
|
||||
|
||||
- run: yarn install
|
||||
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
key: v1-dependencies-{{ checksum "package.json" }}
|
||||
|
||||
- run: yarn prettier:ci
|
||||
- run: yarn lint:ci
|
||||
- run: yarn flow
|
||||
- run: yarn test
|
||||
+3
-1
@@ -40,8 +40,10 @@
|
||||
"deploy:firefox": "node ./shells/browser/firefox/deploy",
|
||||
"linc": "lint-staged",
|
||||
"lint": "eslint '**/*.js'",
|
||||
"lint:ci": "eslint '**/*.js' --max-warnings 0",
|
||||
"precommit": "lint-staged",
|
||||
"prettier": "prettier --write '**/*.{js,json,css}'",
|
||||
"prettier:ci": "prettier --check '**/*.{js,json,css}'",
|
||||
"start": "cd ./shells/dev && opener ./index.html && webpack --config webpack.config.js --watch",
|
||||
"test": "jest",
|
||||
"test-debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
|
||||
@@ -117,7 +119,7 @@
|
||||
"nullthrows": "^1.0.0",
|
||||
"object-assign": "4.0.1",
|
||||
"opener": "^1.5.1",
|
||||
"prettier": "^1.16.1",
|
||||
"prettier": "^1.16.4",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.9.0-alpha.0",
|
||||
"react-color": "^2.11.7",
|
||||
|
||||
@@ -8730,7 +8730,7 @@ preserve@^0.2.0:
|
||||
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=
|
||||
|
||||
prettier@^1.16.1:
|
||||
prettier@^1.16.4:
|
||||
version "1.16.4"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717"
|
||||
integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==
|
||||
|
||||
Reference in New Issue
Block a user