From a2586de6c0ef5d3b4ac11590fedb667cf758e598 Mon Sep 17 00:00:00 2001 From: mwood77 <43637076+mwood77@users.noreply.github.com> Date: Sun, 5 Jan 2025 23:28:38 +0100 Subject: [PATCH 1/5] bump version --- ha-tesla-inventory-tracker/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ha-tesla-inventory-tracker/config.yaml b/ha-tesla-inventory-tracker/config.yaml index 359ce6d..ec45aca 100755 --- a/ha-tesla-inventory-tracker/config.yaml +++ b/ha-tesla-inventory-tracker/config.yaml @@ -1,5 +1,5 @@ name: 'Tesla CPO Inventory Tracker' -version: '0.1.92-rc' +version: '0.1.93-rc' slug: 'tesla_cpo_inventory_tracker' description: "Monitors Tesla's CPO inventory for specific VIN(s) and sends notifications when a watched inventory item's pricing is changed" init: false From 55a1629a5783b7dd3736bfe13f475d80539a14d5 Mon Sep 17 00:00:00 2001 From: mwood77 <43637076+mwood77@users.noreply.github.com> Date: Sun, 5 Jan 2025 23:29:41 +0100 Subject: [PATCH 2/5] relocate job... --- .github/{ => workflows}/lint.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/lint.yaml (100%) diff --git a/.github/lint.yaml b/.github/workflows/lint.yaml similarity index 100% rename from .github/lint.yaml rename to .github/workflows/lint.yaml From b04013cbbd115dc296fbdfd4c2ed8b66d6d684de Mon Sep 17 00:00:00 2001 From: mwood77 <43637076+mwood77@users.noreply.github.com> Date: Sun, 5 Jan 2025 23:31:48 +0100 Subject: [PATCH 3/5] fix: set working directory for Node.js dependencies in lint workflow --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 66e73f8..43e4722 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -22,8 +22,8 @@ jobs: with: node-version-file: ha-tesla-inventory-tracker/.nvmrc - # ESLint and Prettier must be in `package.json` - name: Install Node.js dependencies + working-directory: ha-tesla-inventory-tracker run: npm ci - name: Lint Action From 00caed83fac223e9f714f4dc0f8c2bcea556287e Mon Sep 17 00:00:00 2001 From: mwood77 <43637076+mwood77@users.noreply.github.com> Date: Sun, 5 Jan 2025 23:40:08 +0100 Subject: [PATCH 4/5] swap to lint fork because eslint v9 --- .github/workflows/lint.yaml | 2 +- ha-tesla-inventory-tracker/.prettierrc | 6 ++++++ ha-tesla-inventory-tracker/package.json | 27 +------------------------ 3 files changed, 8 insertions(+), 27 deletions(-) create mode 100644 ha-tesla-inventory-tracker/.prettierrc diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 43e4722..7a80eb8 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -27,7 +27,7 @@ jobs: run: npm ci - name: Lint Action - uses: wearerequired/lint-action@v2.3.0 + uses: rkuykendall/lint-action@master with: eslint: true prettier: true diff --git a/ha-tesla-inventory-tracker/.prettierrc b/ha-tesla-inventory-tracker/.prettierrc new file mode 100644 index 0000000..d1039fb --- /dev/null +++ b/ha-tesla-inventory-tracker/.prettierrc @@ -0,0 +1,6 @@ +{ + "trailingComma": "es5", + "tabWidth": 4, + "semi": false, + "singleQuote": true +} \ No newline at end of file diff --git a/ha-tesla-inventory-tracker/package.json b/ha-tesla-inventory-tracker/package.json index db79a36..0ea8554 100755 --- a/ha-tesla-inventory-tracker/package.json +++ b/ha-tesla-inventory-tracker/package.json @@ -16,30 +16,5 @@ "js-yaml": "4.1.0", "prettier": "^3.4.2", "sqlite3": "^5.1.6" - }, - "prettier": { - "trailingComma": "es5", - "tabWidth": 4, - "semi": false, - "singleQuote": true - }, - "eslintConfig": { - "env": { - "browser": true, - "node": true, - "es2021": true - }, - "extends": "airbnb-base", - "parserOptions": { - "ecmaVersion": 12, - "sourceType": "module" - }, - "rules": { - "no-console": "warn", - "eqeqeq": "error", - "indent": ["error", 2], - "semi": ["error", "always"], - "quotes": ["error", "single"] - } - } + } } From c1be544117216c3ebb737c11e79e6fbb2f1870ef Mon Sep 17 00:00:00 2001 From: mwood77 <43637076+mwood77@users.noreply.github.com> Date: Sun, 5 Jan 2025 23:44:08 +0100 Subject: [PATCH 5/5] prettier --- .github/workflows/lint.yaml | 33 --------------------- ha-tesla-inventory-tracker/.prettierrc | 2 +- ha-tesla-inventory-tracker/eslint.config.js | 17 +++++------ 3 files changed, 9 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml deleted file mode 100644 index 7a80eb8..0000000 --- a/.github/workflows/lint.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Lint Project - -on: - pull_request: - branches: - - main - -permissions: - checks: write - contents: read - -jobs: - lint: - name: Lint Project - runs-on: ubuntu-latest - steps: - - name: Check out Git repository - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version-file: ha-tesla-inventory-tracker/.nvmrc - - - name: Install Node.js dependencies - working-directory: ha-tesla-inventory-tracker - run: npm ci - - - name: Lint Action - uses: rkuykendall/lint-action@master - with: - eslint: true - prettier: true diff --git a/ha-tesla-inventory-tracker/.prettierrc b/ha-tesla-inventory-tracker/.prettierrc index d1039fb..e74ed9f 100644 --- a/ha-tesla-inventory-tracker/.prettierrc +++ b/ha-tesla-inventory-tracker/.prettierrc @@ -3,4 +3,4 @@ "tabWidth": 4, "semi": false, "singleQuote": true -} \ No newline at end of file +} diff --git a/ha-tesla-inventory-tracker/eslint.config.js b/ha-tesla-inventory-tracker/eslint.config.js index 56fbc2a..67753c1 100644 --- a/ha-tesla-inventory-tracker/eslint.config.js +++ b/ha-tesla-inventory-tracker/eslint.config.js @@ -1,12 +1,11 @@ -import js from "@eslint/js"; +import js from '@eslint/js' export default [ js.configs.recommended, - - { - rules: { - "no-unused-vars": "warn", - "no-undef": "warn" - } - } -]; \ No newline at end of file + { + rules: { + 'no-unused-vars': 'warn', + 'no-undef': 'warn', + }, + }, +]