Skip to content

Commit a5e1200

Browse files
committed
Cleanup and add lint step to build workflow
1 parent 274c473 commit a5e1200

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

.eslintrc.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ module.exports = {
4040
selector: 'memberLike',
4141
leadingUnderscore: 'forbid',
4242
trailingUnderscore: 'forbid',
43-
// filter: {
44-
// match: false,
45-
// regex: '(_id|__typename|__resolveType)',
46-
// },
4743
format: null,
4844
},
4945
{

.github/workflows/raspberry-pi-3-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Installs and builds the package (including native modules)
22
# Using the image: balenalib/raspberrypi3-alpine-node:16
3-
name: Docker Install & Build - Raspberry Pi 3
3+
name: Build - Raspberry Pi 3
44

55
on:
66
push:
@@ -16,6 +16,8 @@ jobs:
1616
- uses: actions/checkout@v3
1717
with:
1818
submodules: "recursive"
19+
- name: Lint
20+
run: npm run lint
1921
- name: Install ARM64 binfmt
2022
run: docker run --privileged --rm tonistiigi/binfmt --install arm
2123
- name: Build for Raspberry Pi 3

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![build](https://img.shields.io/github/workflow/status/alexeden/rpi-led-matrix/Docker%20Install%20&%20Build%20-%20Raspberry%20Pi%203?label=RPI3%20BUILD&style=for-the-badge)
1+
![build](https://img.shields.io/github/workflow/status/alexeden/rpi-led-matrix/Build%20-%20Raspberry%20Pi%203?label=RPI3%20BUILD&style=for-the-badge)
22
![npm version](https://img.shields.io/npm/v/rpi-led-matrix/latest?style=for-the-badge)
33
![types](https://img.shields.io/npm/types/rpi-led-matrix?style=for-the-badge)
44
![dependencies](https://img.shields.io/librariesio/release/npm/rpi-led-matrix?style=for-the-badge&logoColor=white)
@@ -53,10 +53,10 @@ Usage:
5353

5454
```ts
5555
// In a .ts file
56-
import * as matrix from "rpi-led-matrix";
56+
import * as matrix from 'rpi-led-matrix';
5757

5858
// Or, in a .js file
59-
const matrix = require("rpi-led-matrix");
59+
const matrix = require('rpi-led-matrix');
6060
```
6161

6262
# Getting Started
@@ -83,7 +83,7 @@ Both `MatrixOptions` and `RuntimeOptions` are of a non-trivial size in terms of
8383
With the use of those helper methods, this is all it takes to create a matrix (of types `LedMatrixInstance`) that's ready to glow:
8484

8585
```ts
86-
import { LedMatrix } from "rpi-led-matrix";
86+
import { LedMatrix } from 'rpi-led-matrix';
8787

8888
const matrix = new LedMatrix(
8989
LedMatrix.defaultMatrixOptions(),
@@ -105,7 +105,7 @@ import {
105105
GpioMapping,
106106
LedMatrixUtils,
107107
PixelMapperType,
108-
} from "rpi-led-matrix";
108+
} from 'rpi-led-matrix';
109109

110110
const matrix = new LedMatrix(
111111
{
@@ -147,7 +147,7 @@ interface MatrixOptions {
147147
disableHardwarePulsing: boolean;
148148
hardwareMapping: GpioMapping;
149149
inverseColors: boolean;
150-
ledRgbSequence: "RGB" | "BGR" | "BRG" | "RBG" | "GRB" | "GBR";
150+
ledRgbSequence: 'RGB' | 'BGR' | 'BRG' | 'RBG' | 'GRB' | 'GBR';
151151
multiplexing: MuxType;
152152
parallel: 1 | 2 | 3 | 4;
153153
pixelMapperConfig: string;
@@ -188,12 +188,12 @@ enum RowAddressType {
188188

189189
```ts
190190
enum GpioMapping {
191-
Regular = "regular",
192-
AdafruitHat = "adafruit-hat",
193-
AdafruitHatPwm = "adafruit-hat-pwm",
194-
RegularPi1 = "regular-pi1",
195-
Classic = "classic",
196-
ClassicPi1 = "classic-pi1",
191+
Regular = 'regular',
192+
AdafruitHat = 'adafruit-hat',
193+
AdafruitHatPwm = 'adafruit-hat-pwm',
194+
RegularPi1 = 'regular-pi1',
195+
Classic = 'classic',
196+
ClassicPi1 = 'classic-pi1',
197197
}
198198
```
199199

@@ -332,7 +332,7 @@ Finally, apply a sync hook that updates each pixel after each sync:
332332

333333
```ts
334334
matrix.afterSync((mat, dt, t) => {
335-
pulsers.forEach((pulser) => {
335+
pulsers.forEach(pulser => {
336336
matrix.fgColor(pulser.nextColor(t)).setPixel(pulser.x, pulser.y);
337337
});
338338

0 commit comments

Comments
 (0)