Skip to content

Commit

Permalink
Restructure and add lint
Browse files Browse the repository at this point in the history
  • Loading branch information
NorthernMan54 committed Dec 3, 2024
1 parent 3e507dc commit 9f38fc8
Show file tree
Hide file tree
Showing 23 changed files with 5,754 additions and 4,224 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ alexaDiscovery.json
tools/after.json
tools/output.txt

gh-md-toc
gh-md-toc
/test/hbConfig/accessories
/test/hbConfig/backups
/test/hbConfig/persist
test/hbConfig/config.json
16 changes: 0 additions & 16 deletions beta.sh

This file was deleted.

7 changes: 7 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
"placeholder": false,
"description": "Enable beta test environment. Only available by invitation."
},
"deviceCleanup": {
"title": "<b>Cleanup of Not Responding Devices</b>",
"type": "boolean",
"default": true,
"description": "Enables cleanup of devices that are not responding. This will remove devices from Alexa that are not responding. Defaults to true."
},
"refresh": {
"title": "<b>Accessory Cache Refresh Interval</b>",
"type": "integer",
Expand Down Expand Up @@ -255,6 +261,7 @@
"items": [
"pin",
"routines",
"deviceCleanup",
"debug",
"thermostatTurnOn",
"enhancedSkip",
Expand Down
34 changes: 34 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/** @type {import('eslint').FlatConfig[]} */
import pluginJs from "@eslint/js";
import pluginJest from "eslint-plugin-jest";
import globals from "globals";


export default [
{
files: ["**/*.js"],
languageOptions: {
sourceType: "commonjs", // This is necessary to parse imports/exports
globals: {
...globals.browser,
...globals.es2021,
...globals.jest, // Add Jest globals
},
},
// Add any other specific rules here
},
pluginJs.configs.recommended,
{
plugins: {
jest: pluginJest,
},
rules: {
...pluginJest.configs.recommended.rules,
"no-unused-vars": "warn", // Change no-unused-vars to a warning
},
},
{
// Exclude test, tools, and lib directories from linting
ignores: ["test/**/*", "tools/**/*js"], // Exclude these files from linting
}
];
Loading

0 comments on commit 9f38fc8

Please sign in to comment.