Update template and workflow files from Homebridge template plugin

This commit is contained in:
dennis committed 2026-02-08 16:21:15 +01:00
1 parent a8bdeddabd
commit 2b840ec462
7 files changed
+55 -49

No files matched your search

-38
View File
@@ -1,38 +0,0 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended" // uses the recommended rules from the @typescript-eslint/eslint-plugin
],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"ignorePatterns": [
"dist"
],
"rules": {
"quotes": ["warn", "single"],
"indent": ["warn", 2, { "SwitchCase": 1 }],
"semi": ["off"],
"comma-dangle": ["warn", "always-multiline"],
"dot-notation": "off",
"eqeqeq": "warn",
"curly": ["warn", "all"],
"brace-style": ["warn"],
"prefer-arrow-callback": ["warn"],
"max-len": ["warn", 140],
"no-console": ["warn"], // use the provided Homebridge log method instead
"no-non-null-assertion": ["off"],
"comma-spacing": ["error"],
"no-multi-spaces": ["warn", { "ignoreEOLComments": true }],
"no-trailing-spaces": ["warn"],
"lines-between-class-members": ["warn", "always", {"exceptAfterSingleLine": true}],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/semi": ["warn"],
"@typescript-eslint/member-delimiter-style": ["warn"]
}
}
@@ -19,5 +19,4 @@ assignees: ''
**Additional context:**
<!-- Add any other context or screenshots about the feature request here. -->
<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
+12 -6
View File
@@ -7,15 +7,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# the Node.js versions to build on
node-version: [12.x, 13.x, 14.x, 15.x, 16.x]
node-version: [20.x, 22.x, 24.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
@@ -27,5 +27,11 @@ jobs:
- name: Build the project
run: npm run build
env:
CI: true
- name: List, audit, fix outdated dependencies and build again
run: |
npm list --outdated
npm audit || true # ignore failures
npm audit fix || true
npm list --outdated
npm run build
+3 -1
View File
@@ -10,7 +10,7 @@ src
.github
# eslint
.eslintrc
eslint.config.js
# typescript
tsconfig.json
@@ -135,3 +135,5 @@ web_modules/
.yarn/unplugged
.yarn/build-state.yml
.pnp.*
test/
+4 -2
View File
@@ -1,8 +1,10 @@
{
"files.eol": "\n",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.rulers": [ 140 ],
"editor.rulers": [
140
],
"eslint.enable": true
}
+1 -1
View File
@@ -1,4 +1,4 @@
<p align="center">
<p>
<img src="https://github.com/homebridge/branding/blob/latest/logos/homebridge-color-round-stylized.png" width="150" alt="Homebridge">
</p>
+35
View File
@@ -0,0 +1,35 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: ['dist/**'],
},
{
rules: {
'quotes': ['error', 'single'],
'indent': ['error', 2, { 'SwitchCase': 0 }],
'linebreak-style': ['error', 'unix'],
'semi': ['error', 'always'],
'comma-dangle': ['error', 'always-multiline'],
'dot-notation': 'error',
'eqeqeq': ['error', 'smart'],
'curly': ['error', 'all'],
'brace-style': ['error'],
'prefer-arrow-callback': 'warn',
'max-len': ['warn', 160],
'object-curly-spacing': ['error', 'always'],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error', { 'classes': false, 'enums': false }],
'@typescript-eslint/no-unused-vars': ['error', { 'caughtErrors': 'none' }],
},
},
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
},
eslint.configs.recommended,
...tseslint.configs.recommended,
);