Skip to content

Commit

Permalink
💎 style scripts (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradgarropy authored Feb 23, 2021
1 parent 06ff774 commit 15b2cc5
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: "📦 install"
run: npm install
run: npm ci
- name: "🧪 test"
run: npm run test
- name: "👖 coveralls"
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "💎 style"

on: pull_request

jobs:
style:
name: "💎 style"
runs-on: ubuntu-latest
steps:
- name: "📚 checkout"
uses: actions/[email protected]
- name: "🟢 node"
uses: actions/[email protected]
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: "📦 install"
run: npm ci
- name: "🧶 lint"
run: npm run lint
- name: "💾 format"
run: npm run format
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: "📦 install"
run: npm install
run: npm ci
- name: "🧪 test"
run: npm run test
21 changes: 21 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# editor
.vscode

# dependencies
.cache
node_modules

# build
dist

# test
coverage

# host
.netlify

# secrets
.env*

# logs
debug.log
23 changes: 21 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bradgarropy/hue-sdk",
"version": "1.5.1",
"version": "1.5.2",
"description": "💡 philips hue sdk",
"keywords": [
"javascript",
Expand Down Expand Up @@ -35,6 +35,10 @@
"scripts": {
"start": "tsc --watch",
"build": "tsc",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"format": "prettier --check .",
"format:fix": "prettier --write .",
"test": "jest --passWithNoTests",
"test:watch": "jest --passWithNoTests --watch",
"prepare": "tsc"
Expand All @@ -56,6 +60,7 @@
"eslint-plugin-simple-import-sort": "^7.0.0",
"jest": "^26.6.3",
"jest-fetch-mock": "^3.0.3",
"prettier": "^2.2.1",
"ts-jest": "^26.5.0",
"typescript": "^4.1.3"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/hue/turnOffAllLights.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fetch from "jest-fetch-mock"

import hue from "../utils/hue"
import {generateLights, generateRawLights} from "../utils/generators"
import hue from "../utils/hue"
import {updateResponse} from "../utils/mocks"

test("turns off all lights", async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/hue/turnOnAllLights.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fetch from "jest-fetch-mock"

import hue from "../utils/hue"
import {generateLights, generateRawLights} from "../utils/generators"
import hue from "../utils/hue"
import {updateResponse} from "../utils/mocks"

test("turns on all lights", async () => {
Expand Down

0 comments on commit 15b2cc5

Please sign in to comment.