Skip to content

Commit

Permalink
Removed old code and fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
James Kerr committed Aug 9, 2018
1 parent 02a9d5e commit e29c42a
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 439 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ npx jest --watch



## Code Style

This project uses eslint and prettier for style consistency.

Run the linter:

```
npm run lint
```

Run the code formatter:

```
npm run format
```



## Release

```
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"author": "Looky Labs, Inc.",
"scripts": {
"start": "npm-run-all -p electron watch:*",
"test": "jest src/js",
"test": "jest --roots src/js",
"pretest": "npm run lint",
"electron": "electron .",
"release": "electron-packager . Looky --out releases --overwrite --icon dist/static/looky.smaller.icns",
"prerelease": "npm run build",
Expand All @@ -20,7 +21,9 @@
"watch:js": "npm run build:js -- --watch",
"watch:css": "npm run build:css -- --watch",
"watch:static": "npm run build:static -- --watch",
"watch:reload": "livereload dist"
"watch:reload": "livereload dist",
"lint": "eslint src",
"format": "prettier"
},
"jest": {
"notify": true,
Expand Down
4 changes: 2 additions & 2 deletions src/js/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
parserOptions:
ecmaVersion: 6
ecmaVersion: 2018
ecmaFeatures:
jsx: true
experimentalObjectRestSpread: true
sourceType: "module"

env:
node: true
browser: true
jest: true
es6: true
Expand Down
2 changes: 1 addition & 1 deletion src/js/actions/boomd.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const connectBoomd = () => (dispatch, getState, api) => {
dispatch(setBoomdError("Incorrect user and pass combination."))
else dispatch(connectedBoomd())
})
.catch(res => {
.catch(_res => {
dispatch(setBoomdError("No server running at that host and port."))
})
}
2 changes: 1 addition & 1 deletion src/js/actions/fetchMainSearch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as actions from "."
import * as selectors from "../selectors"
import * as outMessages from "../treehouse/outMessages"
import * as outMessages from "../boom/outMessages"
import eventsReceiver from "../receivers/eventsReceiver"
import countByTimeReceiver from "../receivers/countByTimeReceiver"
import analyticsReceiver from "../receivers/analyticsReceiver"
Expand Down
2 changes: 1 addition & 1 deletion src/js/actions/fetchNextPage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as actions from "."
import * as selectors from "../selectors/index"
import outMessages from "../treehouse/outMessages"
import outMessages from "../boom/outMessages"
import eventsReceiver from "../receivers/eventsReceiver"

export function fetchMainSearchPage() {
Expand Down
2 changes: 1 addition & 1 deletion src/js/actions/logDetails.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as actions from "."
import * as outMessages from "../treehouse/outMessages"
import * as outMessages from "../boom/outMessages"
import {getCurrentSpace} from "../reducers/spaces"
import * as selectors from "../selectors"

Expand Down
2 changes: 1 addition & 1 deletion src/js/actions/mainSearch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {getCurrentSpace} from "../reducers/spaces"
import * as outMessages from "../treehouse/outMessages"
import * as outMessages from "../boom/outMessages"
import uniq from "lodash/uniq"

export function requestMainSearch({saveToHistory, query}) {
Expand Down
2 changes: 1 addition & 1 deletion src/js/actions/spaces.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as outMessages from "../treehouse/outMessages"
import * as outMessages from "../boom/outMessages"

export function fetchSpaceInfo(name) {
return (dispatch, getState, api) => {
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion src/js/reducers/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import reducer from "."
test("NEW_BRO_SCHEMA", () => {
const newState = reducer(undefined, {
type: "NEW_BRO_SCHEMA",
spaceName: "default",
id: "1",
descriptor: ["...schema stuff"]
})

expect(newState.broSchemas).toEqual({
1: ["...schema stuff"]
"default.1": ["...schema stuff"]
})
})
1 change: 0 additions & 1 deletion src/js/reducers/searchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import isNumber from "lodash/isNumber"
import trim from "lodash/trim"
import {changeProgramTimeWindow} from "../changeProgramTimeWindow"
import {createSelector} from "reselect"
import compact from "lodash/compact"

export const initialState = {
current: "",
Expand Down
148 changes: 0 additions & 148 deletions src/js/treehouse/Api.js

This file was deleted.

59 changes: 0 additions & 59 deletions src/js/treehouse/Api.test.js

This file was deleted.

Loading

0 comments on commit e29c42a

Please sign in to comment.