mirror of
https://github.com/dtwardow/homebridge-multi-tap-switch.git
synced 2026-11-01 20:18:30 +00:00
Update template and workflow files from Homebridge template plugin
This commit is contained in:
1 parent
a8bdeddabd
commit
2b840ec462
9 files changed
+59
-53
No files matched your search
@@ -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"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -41,4 +41,4 @@ Show your Homebridge config.json here, remove any sensitive information.
|
|||||||
* **NPM Version**: <!-- npm -v -->
|
* **NPM Version**: <!-- npm -v -->
|
||||||
* **Operating System**: <!-- Raspbian / Ubuntu / Debian / Windows / macOS / Docker / hb-service -->
|
* **Operating System**: <!-- Raspbian / Ubuntu / Debian / Windows / macOS / Docker / hb-service -->
|
||||||
|
|
||||||
<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
|
<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
|
||||||
@@ -19,5 +19,4 @@ assignees: ''
|
|||||||
**Additional context:**
|
**Additional context:**
|
||||||
<!-- Add any other context or screenshots about the feature request here. -->
|
<!-- Add any other context or screenshots about the feature request here. -->
|
||||||
|
|
||||||
|
<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
|
||||||
<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
|
|
||||||
@@ -35,4 +35,4 @@ Show your Homebridge config.json here, remove any sensitive information.
|
|||||||
* **NPM Version**: <!-- npm -v -->
|
* **NPM Version**: <!-- npm -v -->
|
||||||
* **Operating System**: <!-- Raspbian / Ubuntu / Debian / Windows / macOS / Docker / hb-service -->
|
* **Operating System**: <!-- Raspbian / Ubuntu / Debian / Windows / macOS / Docker / hb-service -->
|
||||||
|
|
||||||
<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
|
<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
|
||||||
@@ -7,15 +7,15 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# the Node.js versions to build on
|
node-version: [20.x, 22.x, 24.x]
|
||||||
node-version: [12.x, 13.x, 14.x, 15.x, 16.x]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
@@ -27,5 +27,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Build the project
|
- name: Build the project
|
||||||
run: npm run build
|
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
@@ -10,7 +10,7 @@ src
|
|||||||
.github
|
.github
|
||||||
|
|
||||||
# eslint
|
# eslint
|
||||||
.eslintrc
|
eslint.config.js
|
||||||
|
|
||||||
# typescript
|
# typescript
|
||||||
tsconfig.json
|
tsconfig.json
|
||||||
@@ -135,3 +135,5 @@ web_modules/
|
|||||||
.yarn/unplugged
|
.yarn/unplugged
|
||||||
.yarn/build-state.yml
|
.yarn/build-state.yml
|
||||||
.pnp.*
|
.pnp.*
|
||||||
|
|
||||||
|
test/
|
||||||
Vendored
+4
-2
@@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"files.eol": "\n",
|
"files.eol": "\n",
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": true
|
"source.fixAll.eslint": "explicit"
|
||||||
},
|
},
|
||||||
"editor.rulers": [ 140 ],
|
"editor.rulers": [
|
||||||
|
140
|
||||||
|
],
|
||||||
"eslint.enable": true
|
"eslint.enable": true
|
||||||
}
|
}
|
||||||
@@ -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">
|
<img src="https://github.com/homebridge/branding/blob/latest/logos/homebridge-color-round-stylized.png" width="150" alt="Homebridge">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
);
|
||||||
Reference in new issue
Block a user