From 8c2f1e5d700c64e5d5c07f7a81cbcadcefa6f0c3 Mon Sep 17 00:00:00 2001 From: Tim deBoer Date: Fri, 19 Jan 2024 13:26:40 -0500 Subject: [PATCH 1/2] chore: pick up missing linting from podman desktop Saw another extension do this, figure we should too. Signed-off-by: Tim deBoer --- .eslintrc.json | 19 ++++++++++--------- package.json | 3 ++- yarn.lock | 5 +++++ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index c7569055..f9b5434d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -32,17 +32,18 @@ "/@gen": "./src-generated" }, "extensions": [".ts"], - "packages": ["packages/*", "extensions/*"] + "packages": ["packages/*"] } } }, - "plugins": ["@typescript-eslint", "sonarjs", "etc", "redundant-undefined"], "ignorePatterns": [ "node_modules/**", "**/dist/**" ], + "plugins": ["@typescript-eslint", "sonarjs", "etc", "redundant-undefined", "no-null"], "rules": { - "@typescript-eslint/no-unused-vars": "error", + "eqeqeq": "error", + "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/consistent-type-imports": "error", "@typescript-eslint/no-explicit-any": "error", @@ -51,6 +52,7 @@ "@typescript-eslint/no-floating-promises": "error", "@typescript-eslint/no-misused-promises": "error", "@typescript-eslint/prefer-optional-chain": "error", + "no-null/no-null": "error", /** * Having a semicolon helps the optimizer interpret your code correctly. @@ -71,10 +73,8 @@ /** * Just for beauty */ - "quotes": [ - "warn", "single" - ], - "import/no-duplicates" : "error", + "quotes": ["error", "single", { "allowTemplateLiterals": true }], + "import/no-duplicates": "error", "import/no-unresolved": "off", "import/default": "off", "import/no-named-as-default-member": "off", @@ -85,6 +85,7 @@ "sonarjs/no-small-switch": "off", "etc/no-commented-out-code": "error", "etc/no-deprecated": "off", - "redundant-undefined/redundant-undefined": "error" + "redundant-undefined/redundant-undefined": "error", + "import/no-extraneous-dependencies": "error" } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 8d03e256..69a3639a 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ }, "dependencies": {}, "devDependencies": { - "@podman-desktop/api": "^1.6.3", + "@podman-desktop/api": "0.0.202401191125-9c1aea6", "@typescript-eslint/eslint-plugin": "^6.16.0", "@typescript-eslint/parser": "^6.16.0", "@vitest/coverage-v8": "^1.1.0", @@ -94,6 +94,7 @@ "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-etc": "^2.0.3", "eslint-plugin-import": "^2.29.1", + "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-redundant-undefined": "^1.0.0", "eslint-plugin-sonarjs": "^0.23.0", "prettier": "^3.1.1", diff --git a/yarn.lock b/yarn.lock index b4bee6ce..597cbc58 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1136,6 +1136,11 @@ eslint-plugin-import@^2.29.1: semver "^6.3.1" tsconfig-paths "^3.15.0" +eslint-plugin-no-null@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-no-null/-/eslint-plugin-no-null-1.0.2.tgz#1236a812391390a1877ad4007c26e745341c951f" + integrity sha512-uRDiz88zCO/2rzGfgG15DBjNsgwWtWiSo4Ezy7zzajUgpnFIqd1TjepKeRmJZHEfBGu58o2a8S0D7vglvvhkVA== + eslint-plugin-redundant-undefined@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-plugin-redundant-undefined/-/eslint-plugin-redundant-undefined-1.0.0.tgz#b5c851b0f6fcd74fa67c300579b6e59e30b5d131" From 10a70a398edc01a029a8e79e6c53c1f5dc7a002d Mon Sep 17 00:00:00 2001 From: Tim deBoer Date: Fri, 19 Jan 2024 13:41:40 -0500 Subject: [PATCH 2/2] chore: add missing podman desktop version Signed-off-by: Tim deBoer --- package.json | 5 ++--- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 69a3639a..50141555 100644 --- a/package.json +++ b/package.json @@ -83,9 +83,8 @@ "lint:fix": "eslint . --fix --ext js,ts,tsx", "watch": "vite build -w" }, - "dependencies": {}, "devDependencies": { - "@podman-desktop/api": "0.0.202401191125-9c1aea6", + "@podman-desktop/api": "^0.0.202401191125-9c1aea6", "@typescript-eslint/eslint-plugin": "^6.16.0", "@typescript-eslint/parser": "^6.16.0", "@vitest/coverage-v8": "^1.1.0", @@ -102,4 +101,4 @@ "vite": "^5.0.10", "vitest": "^1.1.0" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 597cbc58..3994a847 100644 --- a/yarn.lock +++ b/yarn.lock @@ -287,10 +287,10 @@ dependencies: esquery "^1.4.0" -"@podman-desktop/api@^1.6.3": - version "1.6.3" - resolved "https://registry.yarnpkg.com/@podman-desktop/api/-/api-1.6.3.tgz#8a7fe63a9faeadfb69544f9a0b84918d33eded2c" - integrity sha512-l0gaQtZcR1cP4VWaOCRBNmF0WJKPCT97oQ+wR5cy2HXbk1wz10wDX7nGcUw5iQ8Gb85bvMss5I81B7LnR9J+EQ== +"@podman-desktop/api@^0.0.202401191125-9c1aea6": + version "0.0.202401191125-9c1aea6" + resolved "https://registry.npmjs.org/@podman-desktop/api/-/api-0.0.202401191125-9c1aea6.tgz" + integrity sha512-4oMQmfCXpnQrnEihe1yn3mGZULle4a0MlXdyOZ4vlKx04e2rZK7jFI45EjU6L64pwN0bGHWLFRI12Ut2sAirHQ== "@rollup/rollup-android-arm-eabi@4.9.1": version "4.9.1"