Skip to content

Commit

Permalink
Merge pull request chasenicholl#24 from DMBlakeley/main
Browse files Browse the repository at this point in the history
Update Hombridge and dependecies
  • Loading branch information
chasenicholl authored Oct 17, 2024
2 parents bcac2b8 + 003b0c6 commit bf82880
Show file tree
Hide file tree
Showing 7 changed files with 1,153 additions and 918 deletions.
4 changes: 1 addition & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
"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"]
"@typescript-eslint/explicit-module-boundary-types": "off"
}
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/).

## v4.1.0
* Confirm plug-in operation with Homebridge 2.0.0. Updated package.json per homebridge instructions.
* Update `config.schema.json` to require `station_id` for both `http_api` and `local_api`. Update associated code in `platform.ts`.
* Update `@types/node` to "^22.0.0"
* Update `@typescript-eslint/eslint-plugin` to "^8.0.0"
* Update `@typescript-eslint/parser` to "^8.0.0"
* Update `eslint` to "^9.0.0".
* Update `rimraf` to "^6.0.1"
* Update `axios` to "1.7.7

## v4.0.2
* When using HTTP API, check that `token` and `station_id` are present and have valid characteristics.
* When Local API is used, `token` and `station_id` are not required and are not validated.
Expand Down
7 changes: 2 additions & 5 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@
}
},
"station_id": {
"title": "Station ID (Integer)",
"title": "Station ID (Integer of 5 digits)",
"type": "number",
"default": 0,
"condition": {
"functionBody": "if (model.local_api != undefined && !model.local_api) { return true; } else { return false; };"
}
"default": 0
},
"interval": {
"title": "Interval (seconds)",
Expand Down
61 changes: 61 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [{
ignores: ['**/dist'],
}, ...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
), {
languageOptions: {
parser: tsParser,
ecmaVersion: 2018,
sourceType: 'module',
},

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'],
'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',
},
}];
Loading

0 comments on commit bf82880

Please sign in to comment.