Skip to content

ci: add linting step to ci #27

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

Merged
merged 1 commit into from
Jul 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 43 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
defaults:
docker: &docker
defaults: &defaults
docker:
- image: 'circleci/node:8-browsers'
working_directory: ~/repo

repo_cache: &repo_cache
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}

deps_cache: &deps_cache
key: v1-dependencies-{{ checksum "yarn.lock" }}

version: 2
jobs:
build:
docker: *docker
working_directory: ~/repo

checkout_code:
<<: *defaults
steps:
- checkout
- save_cache:
<<: *repo_cache
paths:
- ~/repo

install_dependencies:
<<: *defaults
steps:
- restore_cache: *repo_cache
- restore_cache:
keys:
- v1-dependencies-{{ checksum "yarn.lock" }}
Expand All @@ -26,12 +39,33 @@ jobs:
- packages/form/node_modules
- packages/router/node_modules
- packages/store/node_modules
key: v1-dependencies-{{ checksum "yarn.lock" }}

<<: *deps_cache

lint:
<<: *defaults
steps:
- restore_cache: *repo_cache
- restore_cache: *deps_cache
- run: yarn lint

build:
<<: *defaults
steps:
- restore_cache: *repo_cache
- restore_cache: *deps_cache
- run: yarn build

workflows:
version: 2
build:
jobs:
- build
- checkout_code
- install_dependencies:
requires:
- checkout_code
- lint:
requires:
- install_dependencies
- build:
requires:
- install_dependencies
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
],
"scripts": {
"build": "lerna run build",
"lint": "lerna run lint",
"lint": "npm-run-all -p lint:*",
"lint:packages": "lerna run lint",
"lint:prettier": "prettier -l \"**/*.*(ts|js|css|scss|json|md)\"",
"commit": "commit",
"prettier": "prettier --write \"**/*.*(ts|js|css|scss|json|md)\"",
"pre-commit": "lint-staged",
Expand All @@ -24,6 +26,7 @@
"husky": "0.14.3",
"lerna": "2.11.0",
"lint-staged": "7.2.0",
"npm-run-all": "4.1.3",
"prettier": "1.13.7"
}
}
3 changes: 0 additions & 3 deletions packages/router/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ For use with Angular 2-4: Use v6.

1. Use npm to install the bindings:


```
npm install @angular-redux/router --save
```

2. Use the `routerReducer` when providing `Store`:


```ts
import { combineReducers } from 'redux';
import { routerReducer } from '@angular-redux/router';
Expand All @@ -38,7 +36,6 @@ export default combineReducers<IAppState>({

3. Add the bindings to your root module.


```ts
import { NgModule } from '@angular/core';
import { NgReduxModule, NgRedux } from '@angular-redux/core';
Expand Down
Loading