Skip to content

Commit 697c3f1

Browse files
authored
Merge pull request #4 from MysteryCode/sacnin-changesorfull
add option to send whole universe or changes only
2 parents 03aa9db + ce238de commit 697c3f1

File tree

14 files changed

+227
-112
lines changed

14 files changed

+227
-112
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/codestyle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v4
1818
- name: Set up node.js
19-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
2020
with:
21-
node-version: "18"
21+
node-version: "22"
2222
cache: "npm"
2323
- run: npm install
2424
- name: Run prettier

.github/workflows/javascript.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
fail-fast: false
1818
steps:
1919
- name: Set up node.js
20-
uses: actions/setup-node@v3
20+
uses: actions/setup-node@v4
2121
with:
22-
node-version: "18"
22+
node-version: "22"
2323
- uses: actions/checkout@v4
2424
- run: echo "::add-matcher::.github/javascript-syntax.json"
2525
- name: Remove files to be ignored

.github/workflows/typescript.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020
- name: Set up node.js
21-
uses: actions/setup-node@v3
21+
uses: actions/setup-node@v4
2222
with:
23-
node-version: "18"
23+
node-version: "22"
2424
cache: "npm"
2525
- run: npm install
2626
- run: |
@@ -33,9 +33,9 @@ jobs:
3333
steps:
3434
- uses: actions/checkout@v4
3535
- name: Set up node.js
36-
uses: actions/setup-node@v3
36+
uses: actions/setup-node@v4
3737
with:
38-
node-version: "18"
38+
node-version: "22"
3939
cache: "npm"
4040
- run: npm install
4141
- run: npx eslint .
@@ -48,9 +48,9 @@ jobs:
4848
steps:
4949
- uses: actions/checkout@v4
5050
- name: Set up node.js
51-
uses: actions/setup-node@v3
51+
uses: actions/setup-node@v4
5252
with:
53-
node-version: "18"
53+
node-version: "22"
5454
cache: "npm"
5555
- run: npm install
5656
- run: rm -R src/**/*.js

eslint.config.mjs

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
2+
import tsParser from "@typescript-eslint/parser";
3+
import path from "node:path";
4+
import {fileURLToPath} from "node:url";
5+
import js from "@eslint/js";
6+
import {FlatCompat} from "@eslint/eslintrc";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
export default [{
17+
ignores: [
18+
"**/*.js",
19+
"**/extra",
20+
"node_modules/**/*",
21+
"tsconfig.json",
22+
"eslint.config.mjs"
23+
]
24+
}, ...compat.extends(
25+
"eslint:recommended",
26+
"plugin:@typescript-eslint/recommended",
27+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
28+
"prettier"
29+
), {
30+
plugins: {
31+
"@typescript-eslint": typescriptEslint
32+
},
33+
34+
languageOptions: {
35+
parser: tsParser,
36+
ecmaVersion: 5,
37+
sourceType: "script",
38+
39+
parserOptions: {
40+
tsconfigRootDir: "C:\\Users\\flori\\PhpStormProjects\\node-red-sacn",
41+
project: true
42+
}
43+
},
44+
45+
rules: {
46+
"@typescript-eslint/no-restricted-types": "error",
47+
48+
"@typescript-eslint/no-explicit-any": 0,
49+
"@typescript-eslint/no-non-null-assertion": 0,
50+
"@typescript-eslint/no-unsafe-argument": 0,
51+
"@typescript-eslint/no-unsafe-assignment": 0,
52+
"@typescript-eslint/no-unsafe-call": 0,
53+
"@typescript-eslint/no-unsafe-member-access": 0,
54+
"@typescript-eslint/no-unsafe-return": 0,
55+
56+
"@typescript-eslint/no-unused-vars": ["error", {
57+
argsIgnorePattern: "^_",
58+
varsIgnorePattern: "^_"
59+
}],
60+
61+
"@typescript-eslint/no-misused-promises": ["error", {
62+
checksVoidReturn: false
63+
}]
64+
}
65+
}];

package-lock.json

Lines changed: 15 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,26 @@
1010
"sacn": "^4.6.0"
1111
},
1212
"devDependencies": {
13+
"@eslint/eslintrc": "^3.1.0",
14+
"@eslint/js": "^9.14.0",
15+
"@types/node": "^22.8.6",
16+
"@types/node-red": "^1.3.5",
1317
"@typescript-eslint/eslint-plugin": "^8.12.2",
1418
"@typescript-eslint/parser": "^8.12.2",
1519
"eslint": "^9.13.0",
1620
"eslint-config-prettier": "^9.1.0",
17-
"prettier": "^3.3.3",
18-
"typescript": "^5.6.3",
19-
"tslib": "^2.8.0",
2021
"node-red": "^4.0.5",
2122
"nodemon": "^3.1.7",
22-
"@types/node": "^22.8.6",
23-
"@types/node-red": "^1.3.5"
23+
"prettier": "^3.3.3",
24+
"tslib": "^2.8.0",
25+
"typescript": "^5.6.3"
2426
},
2527
"scripts": {
26-
"lint": "prettier --ignore-path .eslintignore --check '**/*.{js,ts,md}'; eslint --ext .js,.ts .",
27-
"lint:fix": "prettier --ignore-path .eslintignore --write '**/*.{js,ts,md}'; eslint --ext .js,.ts . --fix"
28+
"prettier": "prettier --ignore-path .eslintignore --check '**/*.{js,ts,md}'",
29+
"lint": "eslint",
30+
"prettier:fix": "prettier --ignore-path .eslintignore --write '**/*.{js,ts,md}'",
31+
"lint:fix": "eslint --fix",
32+
"build": "tsc"
2833
},
2934
"keywords": [
3035
"node-red",

src/sacn/locales/de/sacn-in.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
"mode_htp": "HTP",
88
"mode_ltp": "LTP",
99
"port": "Port",
10-
"universe": "Universum"
10+
"universe": "Universum",
11+
"output": "Ausgabe",
12+
"output_full": "Vollständiges Universum",
13+
"output_changes": "Änderungen"
1114
}
1215
}
1316
}

src/sacn/locales/en-US/sacn-in.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
"mode_htp": "HTP",
88
"mode_ltp": "LTP",
99
"port": "port",
10-
"universe": "universe"
10+
"universe": "universe",
11+
"output": "output",
12+
"output_full": "whole universe",
13+
"output_changes": "changes"
1114
}
1215
}
1316
}

0 commit comments

Comments
 (0)