From 1d22a6a3a35c76c41a2f8db96d4f5fc34b1ef118 Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Fri, 30 Aug 2024 13:36:28 +0800 Subject: [PATCH] chore: release v0.5.0 * (bluefox) Migrated to eslint 9 --- README.md | 2 +- eslint.config.mjs | 57 +++++++++++++++++++++++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 eslint.config.mjs diff --git a/README.md b/README.md index f37e88d..6e94663 100644 --- a/README.md +++ b/README.md @@ -295,7 +295,7 @@ This method returns a promise that resolves to a `ProgressDialog` object. ### **WORK IN PROGRESS** --> ## Changelog -### **WORK IN PROGRESS** +### 0.5.0 (2024-08-30) * (bluefox) Migrated to eslint 9 ### 0.4.0 (2024-08-30) diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..a3065c1 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,57 @@ +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: [ + "build/", + ".prettierrc.js", + "**/.eslintrc.js", + "examples/" + ], + }, + ...compat.extends("plugin:@typescript-eslint/recommended"), + { + settings: {}, + + rules: { + "@typescript-eslint/no-parameter-properties": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-use-before-define": ["error", { + functions: false, + typedefs: false, + classes: false, + }], + "@typescript-eslint/no-unused-vars": ["error", { + ignoreRestSiblings: true, + argsIgnorePattern: "^_", + }], + "@typescript-eslint/explicit-function-return-type": ["warn", { + allowExpressions: true, + allowTypedFunctionExpressions: true, + }], + "@typescript-eslint/no-object-literal-type-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "no-var": "error", + "prefer-const": "error", + "no-trailing-spaces": "error", + }, + }, + { + files: ["**/*.test.ts", "**/*.tsx"], + rules: { + "@typescript-eslint/explicit-function-return-type": "off", + }, + }, +]; diff --git a/package-lock.json b/package-lock.json index 04bd510..820eac5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@iobroker/dm-utils", - "version": "0.4.0", + "version": "0.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@iobroker/dm-utils", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.1.6" diff --git a/package.json b/package.json index 8f5656c..afeddfe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@iobroker/dm-utils", - "version": "0.4.0", + "version": "0.5.0", "description": "ioBroker Device Manager utilities for backend", "main": "build/index.js", "publishConfig": {