Add lit-analyzer and ts-lit-plugin, and fix most of the detected issues

Google-Bug-Id: b/201389933
Change-Id: I32ebd4ce3108ac026683ee079396cefb28393ebf
diff --git a/package.json b/package.json
index a47ba9f..a492055 100644
--- a/package.json
+++ b/package.json
@@ -20,9 +20,11 @@
     "eslint-plugin-prettier": "^3.4.0",
     "eslint-plugin-regex": "^1.8.0",
     "gts": "^3.1.0",
+    "lit-analyzer": "^1.2.1",
     "prettier": "2.3.1",
     "rollup": "^2.45.2",
     "terser": "^5.6.1",
+    "ts-lit-plugin": "^1.2.1",
     "typescript": "4.3.2"
   },
   "scripts": {
@@ -34,6 +36,7 @@
     "safe_bazelisk": "if which bazelisk >/dev/null; then bazel_bin=bazelisk; else bazel_bin=bazel; fi && $bazel_bin",
     "eslint": "npm run safe_bazelisk test polygerrit-ui/app:lint_test",
     "eslintfix": "npm run safe_bazelisk run polygerrit-ui/app:lint_bin -- -- --fix $(pwd)/polygerrit-ui/app",
+    "litlint": "npm run safe_bazelisk run polygerrit-ui/app:lit_analysis",
     "test:debug": "npm run compile:local && npm run safe_bazelisk run //polygerrit-ui:karma_bin -- -- start $(pwd)/polygerrit-ui/karma.conf.js --root '.ts-out/polygerrit-ui/app/' --browsers ChromeDev --no-single-run --test-files",
     "test:single": "npm run compile:local && npm run safe_bazelisk run //polygerrit-ui:karma_bin -- -- start $(pwd)/polygerrit-ui/karma.conf.js --root '.ts-out/polygerrit-ui/app/' --test-files",
     "polylint": "npm run safe_bazelisk test //polygerrit-ui/app:polylint_test",