-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve tooling #6
base: master
Are you sure you want to change the base?
Changes from 5 commits
6dfb0d2
a867956
b480144
97d6d77
e94c980
415c329
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
version: 2 | ||
|
||
jobs: | ||
install: | ||
working_directory: ~/reduck | ||
docker: | ||
- image: circleci/node:8.10.0 | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- attach_workspace: | ||
at: ~/reduck | ||
- run: | ||
name: NPM Install | ||
command: npm install | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "package.json" }} | ||
- persist_to_workspace: | ||
root: ~/reduck | ||
paths: ./node_modules | ||
build: | ||
working_directory: ~/reduck | ||
docker: | ||
- image: circleci/node:8.10.0 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/reduck | ||
- run: | ||
name: Build | ||
command: | | ||
if [ "${CIRCLE_BRANCH}" == "master" ]; then | ||
NODE_ENV=production \ | ||
npm run build | ||
else | ||
NODE_ENV=development \ | ||
npm run build | ||
fi | ||
- persist_to_workspace: | ||
root: ~/reduck | ||
paths: | ||
- ./dist | ||
- ./es | ||
lint: | ||
working_directory: ~/reduck | ||
docker: | ||
- image: circleci/node:8.10.0 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/reduck | ||
- run: | ||
name: Lint | ||
command: npm run lint | ||
test: | ||
working_directory: ~/reduck | ||
docker: | ||
- image: circleci/node:8.10.0 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/reduck | ||
- run: | ||
name: Lint | ||
command: npm run test | ||
|
||
workflows: | ||
version: 2 | ||
install_build_lint_test: | ||
jobs: | ||
- install | ||
- build: | ||
requires: | ||
- install | ||
- lint: | ||
requires: | ||
- install | ||
- test: | ||
requires: | ||
- install |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
--- | ||
env: | ||
jest/globals: true | ||
plugins: | ||
- flowtype | ||
- jest | ||
extends: | ||
- standard | ||
- plugin:import/warnings | ||
- plugin:import/errors | ||
- "@enkidevs/eslint-config-backend" | ||
- plugin:flowtype/recommended | ||
parser: babel-eslint | ||
rules: | ||
jest/no-disabled-tests: 1 | ||
jest/no-focused-test: 0 | ||
jest/no-identical-title: 2 | ||
jest/valid-expect: 2 | ||
node/no-unsupported-features/es-syntax: 0 | ||
no-unused-vars: 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Try using |
||
no-new: 0 | ||
globals: | ||
localStorage: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
singleQuote: true | ||
trailingComma: es5 |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
testRegex: 'src/__tests__/.*\\.test.js$', | ||
collectCoverageFrom: ['src/**/*.js'], | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can fix this one by adding to
package.json
:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it but eslint seemed to ignore it, so i left the rule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imo this should be ok, since they the rule is included in the engines field anyway