From 141afa87cd336c14fbb4e80e2e3905d2393ced7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abd=C3=B3n=20Rodr=C3=ADguez=20Davila?= Date: Thu, 1 Oct 2020 17:33:44 +0200 Subject: [PATCH] [lit-next] Unify ESLint dependency to the root (#1297) - Move the ESLint config and dependencies to the root package. - Remove all the TSLint references. - Remove unneeded disabled global rules. --- .eslintignore | 5 - .eslintrc.json | 45 +- package-lock.json | 962 +++++++++++++++++- package.json | 7 +- .../benchmarks/lit-html/kitchen-sink/index.ts | 2 + packages/benchmarks/package.json | 2 +- packages/benchmarks/tslint.json | 62 -- packages/lit-element/.gitignore | 2 + packages/lit-element/package-lock.json | 70 -- packages/lit-element/package.json | 3 +- packages/lit-element/src/env.d.ts | 1 + .../lit-element/src/lib/decorators/base.ts | 2 +- .../src/lib/decorators/customElement.ts | 2 +- .../src/lib/decorators/eventOptions.ts | 5 +- .../src/lib/decorators/internalProperty.ts | 2 +- .../src/lib/decorators/property.ts | 2 +- .../lit-element/src/lib/decorators/query.ts | 2 +- .../src/lib/decorators/queryAll.ts | 2 +- .../src/lib/decorators/queryAssignedNodes.ts | 4 +- .../src/lib/decorators/queryAsync.ts | 2 +- .../src/lib/lit-element-polyfill.ts | 1 + .../lit-element/src/lib/updating-element.ts | 18 +- .../src/test/decorators/eventOptions_test.ts | 2 - .../test/decorators/internalProperty_test.ts | 2 - .../src/test/decorators/property_test.ts | 4 - .../src/test/decorators/queryAll_test.ts | 2 - .../src/test/decorators/queryAsync_test.ts | 2 - .../src/test/decorators/query_test.ts | 2 - .../src/test/lit-element_styling_test.ts | 1 - .../lit-element/src/test/lit-element_test.ts | 3 +- .../src/test/updating-element_test.ts | 6 +- packages/lit-element/tslint.json | 62 -- packages/lit-html/.gitignore | 3 +- packages/lit-html/package.json | 1 + .../lit-html/src/directives/unsafe-html.ts | 1 + packages/lit-html/src/lit-html.ts | 5 + .../src/test/directives/guard_test.ts | 2 - .../lit-html/src/test/directives/live_test.ts | 2 - .../src/test/directives/repeat_test.ts | 2 - .../src/test/directives/style-map_test.ts | 2 - .../test/directives/template-content_test.ts | 2 - .../src/test/directives/unsafe-html_test.ts | 2 - .../src/test/directives/unsafe-svg_test.ts | 2 - packages/lit-html/src/test/lit-html_test.ts | 8 +- 44 files changed, 996 insertions(+), 325 deletions(-) delete mode 100644 .eslintignore delete mode 100644 packages/benchmarks/tslint.json delete mode 100644 packages/lit-element/tslint.json diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 3a539f619e..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -/packages/*/lib/ -/packages/*/test/**/*.{d.ts,d.ts.map,js,js.map} -/packages/*/index.{d.ts,d.ts.map,js,js.map} - -/packages/lit-html/directives/ diff --git a/.eslintrc.json b/.eslintrc.json index 7a5212a5f6..0d817729c9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,21 +9,36 @@ "ecmaVersion": 2020, "sourceType": "module" }, - "plugins": [ - "@typescript-eslint" - ], + "plugins": ["@typescript-eslint"], "rules": { - "no-unexpected-multiline": "off", - "@typescript-eslint/indent": "off", - - "no-extra-boolean-cast": "off", - "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-use-before-define": "off", - "@typescript-eslint/triple-slash-reference": "off", - - "@typescript-eslint/no-unused-vars": ["warn", { - "argsIgnorePattern": "^_" - }] - } + "@typescript-eslint/no-unused-vars": [ + "warn", + { + "argsIgnorePattern": "^_" + } + ] + }, + "overrides": [ + { + "files": [ + "check-version-tracker.js", + "rollup-common.js", + "rollup.config.js" + ], + "env": { + "node": true + } + }, + { + "files": ["*_test.ts"], + "rules": { + "@typescript-eslint/no-explicit-any": "off" + } + } + ] } diff --git a/package-lock.json b/package-lock.json index 7ff9b67e70..40a41f22de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,6 +34,45 @@ "regenerator-runtime": "^0.13.4" } }, + "@eslint/eslintrc": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", + "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + } + } + }, "@evocateur/libnpmaccess": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz", @@ -1387,6 +1426,12 @@ "@types/node": "*" } }, + "@types/json-schema": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz", + "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==", + "dev": true + }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -1398,15 +1443,253 @@ "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=" }, "@types/node": { - "version": "14.11.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.1.tgz", - "integrity": "sha512-oTQgnd0hblfLsJ6BvJzzSL+Inogp3lq9fGgqRkMB/ziKMgEUaFl801OncOzUmalfzt14N0oPHMK47ipl+wbTIw==" + "version": "14.11.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.2.tgz", + "integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==" }, "@types/normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==" }, + "@typescript-eslint/eslint-plugin": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.3.0.tgz", + "integrity": "sha512-RqEcaHuEKnn3oPFislZ6TNzsBLqpZjN93G69SS+laav/I8w/iGMuMq97P0D2/2/kW4SCebHggqhbcCfbDaaX+g==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "4.3.0", + "@typescript-eslint/scope-manager": "4.3.0", + "debug": "^4.1.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^3.0.0", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.3.0.tgz", + "integrity": "sha512-cmmIK8shn3mxmhpKfzMMywqiEheyfXLV/+yPDnOTvQX/ztngx7Lg/OD26J8gTZfkLKUmaEBxO2jYP3keV7h2OQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/scope-manager": "4.3.0", + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/typescript-estree": "4.3.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.3.0.tgz", + "integrity": "sha512-JyfRnd72qRuUwItDZ00JNowsSlpQGeKfl9jxwO0FHK1qQ7FbYdoy5S7P+5wh1ISkT2QyAvr2pc9dAemDxzt75g==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "4.3.0", + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/typescript-estree": "4.3.0", + "debug": "^4.1.1" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.3.0.tgz", + "integrity": "sha512-cTeyP5SCNE8QBRfc+Lgh4Xpzje46kNUhXYfc3pQWmJif92sjrFuHT9hH4rtOkDTo/si9Klw53yIr+djqGZS1ig==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/visitor-keys": "4.3.0" + } + }, + "@typescript-eslint/types": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.3.0.tgz", + "integrity": "sha512-Cx9TpRvlRjOppGsU6Y6KcJnUDOelja2NNCX6AZwtVHRzaJkdytJWMuYiqi8mS35MRNA3cJSwDzXePfmhU6TANw==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.3.0.tgz", + "integrity": "sha512-ZAI7xjkl+oFdLV/COEz2tAbQbR3XfgqHEGy0rlUXzfGQic6EBCR4s2+WS3cmTPG69aaZckEucBoTxW9PhzHxxw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/visitor-keys": "4.3.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "dependencies": { + "@nodelib/fs.stat": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", + "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", + "dev": true + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "fast-glob": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", + "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "globby": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", + "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.3.0.tgz", + "integrity": "sha512-xZxkuR7XLM6RhvLkgv9yYlTcBHnTULzfnw4i6+z2TGBLy9yljAypQaZl9c3zFvy7PNI7fYWyvKYtohyF8au3cw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.3.0", + "eslint-visitor-keys": "^2.0.0" + } + }, "@zkochan/cmd-shim": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz", @@ -1431,6 +1714,18 @@ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, + "acorn": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", + "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true + }, "agent-base": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", @@ -1511,6 +1806,12 @@ } } }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, "ansi-escapes": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", @@ -1641,6 +1942,12 @@ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -2617,6 +2924,12 @@ "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=" }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "defaults": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", @@ -2713,6 +3026,15 @@ "path-type": "^3.0.0" } }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dot-prop": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", @@ -2767,6 +3089,15 @@ "once": "^1.4.0" } }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, "env-paths": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", @@ -2790,63 +3121,345 @@ "is-arrayish": "^0.2.1" } }, - "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "es-abstract": { + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "requires": { + "es6-promise": "^4.0.3" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eslint": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.10.0.tgz", + "integrity": "sha512-BDVffmqWl7JJXqCjAK6lWtcQThZB/aP1HXSH1JKwGwv0LQEdvpR7qzNrUT487RM39B5goWuboFad5ovMBmD8yA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^0.1.3", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^1.3.0", + "espree": "^7.3.0", + "esquery": "^1.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, - "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "espree": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", + "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", + "dev": true, "requires": { - "es6-promise": "^4.0.3" + "acorn": "^7.4.0", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, "estree-walker": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", "dev": true }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, "eventemitter3": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", @@ -3063,6 +3676,12 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, "fastq": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.8.0.tgz", @@ -3085,6 +3704,15 @@ "escape-string-regexp": "^1.0.5" } }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, "filesize": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz", @@ -3120,6 +3748,34 @@ "locate-path": "^3.0.0" } }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, "flush-write-stream": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", @@ -3205,6 +3861,12 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -3660,6 +4322,23 @@ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, "globby": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", @@ -4033,9 +4712,9 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-callable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.1.tgz", - "integrity": "sha512-wliAfSzx6V+6WfMOmus1xy0XvSgf/dlStkvTfq7F0g4bOIW0PSUbnyse3NhDwdyYS1ozfUtAAySqTws3z9Eqgg==" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==" }, "is-ci": { "version": "2.0.0", @@ -4307,6 +4986,12 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -4366,6 +5051,16 @@ "npmlog": "^4.1.2" } }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, "lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", @@ -5024,6 +5719,12 @@ "to-regex": "^3.0.1" } }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -5601,6 +6302,20 @@ "mimic-fn": "^1.0.0" } }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -5903,6 +6618,23 @@ "readable-stream": "^2.1.5" } }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + }, + "dependencies": { + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + } + } + }, "parse-github-repo-url": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", @@ -6024,6 +6756,12 @@ "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, "printable-characters": { "version": "1.0.42", "resolved": "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz", @@ -6035,6 +6773,12 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", @@ -6319,6 +7063,12 @@ "safe-regex": "^1.1.0" } }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", @@ -6821,6 +7571,25 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } + } + }, "slide": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", @@ -7206,6 +7975,12 @@ "min-indent": "^1.0.0" } }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, "strong-log-transformer": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz", @@ -7224,6 +7999,52 @@ "has-flag": "^3.0.0" } }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "tar": { "version": "4.4.13", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", @@ -7293,6 +8114,12 @@ "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==" }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, "thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -7401,6 +8228,15 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" }, + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -7414,6 +8250,15 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, "type-fest": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", @@ -7424,10 +8269,16 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "typescript": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz", + "integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==", + "dev": true + }, "uglify-js": { - "version": "3.10.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.4.tgz", - "integrity": "sha512-kBFT3U4Dcj4/pJ52vfjCSfyLyvG9VYYuGYPmrPvAxRw/i7xHiT4VvCev+uiEMcEEiu6UNB6KgWmGtSUYIWScbw==", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.0.tgz", + "integrity": "sha512-e1KQFRCpOxnrJsJVqDUCjURq+wXvIn7cK2sRAx9XL3HYLL9aezOP4Pb1+Y3/o693EPk111Yj2Q+IUXxcpHlygQ==", "optional": true }, "uid-number": { @@ -7557,6 +8408,12 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, + "v8-compile-cache": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", + "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", + "dev": true + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -7685,6 +8542,12 @@ "execa": "^1.0.0" } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -7735,6 +8598,15 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, "write-file-atomic": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", diff --git a/package.json b/package.json index 6b574b15dd..ea79fe9258 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "scripts": { "bootstrap": "lerna bootstrap", "build": "lerna run build", + "lint": "lerna run lint", "test": "cd packages/tests && npm test", "benchmarks": "cd packages/benchmarks && npm run benchmarks" }, @@ -12,9 +13,13 @@ "devDependencies": { "@rollup/plugin-replace": "^2.3.3", "@rollup/plugin-virtual": "^2.0.3", + "@typescript-eslint/eslint-plugin": "^4.3.0", + "@typescript-eslint/parser": "^4.3.0", + "eslint": "^7.10.0", "rollup-plugin-copy": "^3.3.0", "rollup-plugin-sourcemaps": "^0.6.2", "rollup-plugin-summary": "^1.2.3", - "rollup-plugin-terser": "^7.0.2" + "rollup-plugin-terser": "^7.0.2", + "typescript": "^4.0.3" } } diff --git a/packages/benchmarks/lit-html/kitchen-sink/index.ts b/packages/benchmarks/lit-html/kitchen-sink/index.ts index 6944be6e4a..a994fd09e9 100644 --- a/packages/benchmarks/lit-html/kitchen-sink/index.ts +++ b/packages/benchmarks/lit-html/kitchen-sink/index.ts @@ -57,6 +57,7 @@ const params = document.location.search .split('&') .map((p) => p.split('=')) .reduce( + // eslint-disable-next-line @typescript-eslint/no-explicit-any (p: {[key: string]: any}, [k, v]) => ((p[k] = JSON.parse(v || 'true')), p), {} ); @@ -133,6 +134,7 @@ const generateData = ( * * @param data Data model for item */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any const renderItem: any = (data: Data) => html`
${data.text} diff --git a/packages/benchmarks/package.json b/packages/benchmarks/package.json index 1f06deb86d..0ad68bc7f2 100644 --- a/packages/benchmarks/package.json +++ b/packages/benchmarks/package.json @@ -10,7 +10,7 @@ "build": "tsc", "build:watch": "tsc --watch", "format": "prettier lit-html/* lit-element/* --write", - "lint": "tslint --project ./", + "lint": "eslint \"**/*.{js,ts}\" --ignore-path .gitignore", "regen-package-lock": "rm -rf node_modules package-lock.json; npm install", "benchmarks": "tach --config lit-html/kitchen-sink/tachometer.json && tach --config lit-element/stub1/tachometer.json", "benchmark:lit-html:kitchen-sink": "tach --config lit-html/kitchen-sink/tachometer.json", diff --git a/packages/benchmarks/tslint.json b/packages/benchmarks/tslint.json deleted file mode 100644 index 898af7e0aa..0000000000 --- a/packages/benchmarks/tslint.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "rules": { - "arrow-parens": true, - "class-name": true, - "indent": [ - true, - "spaces" - ], - "prefer-const": true, - "no-any": true, - "no-duplicate-variable": true, - "no-eval": true, - "no-internal-module": true, - "no-trailing-whitespace": true, - "no-var-keyword": true, - "no-unnecessary-type-assertion": true, - "one-line": [ - true, - "check-open-brace", - "check-whitespace" - ], - "quotemark": [ - true, - "single", - "avoid-escape" - ], - "semicolon": [ - true, - "always" - ], - "trailing-comma": [ - true, - "multiline" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "variable-name": [ - true, - "ban-keywords" - ], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] - } -} diff --git a/packages/lit-element/.gitignore b/packages/lit-element/.gitignore index 0dda37d259..8b8bc9ef78 100644 --- a/packages/lit-element/.gitignore +++ b/packages/lit-element/.gitignore @@ -1 +1,3 @@ +/development/ +/lib/ /lit-element.* diff --git a/packages/lit-element/package-lock.json b/packages/lit-element/package-lock.json index 8257615cd6..51aef707b7 100644 --- a/packages/lit-element/package-lock.json +++ b/packages/lit-element/package-lock.json @@ -1646,11 +1646,6 @@ "dev": true, "optional": true }, - "lit-html": { - "version": "2.0.0-pre.3", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.0.0-pre.3.tgz", - "integrity": "sha512-wnvsb7t3IuCAE2W+I/ZdIM9pjWUVhqmhlUYhZYTCcyGVRxwr0UqfZB+NektXmF16C5MZ838YUs97e+nCPV4NQg==" - }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -1798,12 +1793,6 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, "mixin-deep": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", @@ -2778,65 +2767,6 @@ "repeat-string": "^1.6.1" } }, - "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", - "dev": true - }, - "tslint": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", - "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^4.0.1", - "glob": "^7.1.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.3", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.13.0", - "tsutils": "^2.29.0" - }, - "dependencies": { - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - } - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, "typescript": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz", diff --git a/packages/lit-element/package.json b/packages/lit-element/package.json index 9d459b9d77..481a6ce07e 100644 --- a/packages/lit-element/package.json +++ b/packages/lit-element/package.json @@ -47,7 +47,7 @@ "test:watch": "npm run test:dev -- --watch", "checksize": "rollup -c --environment=CHECKSIZE", "format": "prettier src/* --write", - "lint": "tslint --project ./", + "lint": "eslint \"**/*.{js,ts}\" --ignore-path .gitignore", "check-version": "node scripts/check-version-tracker.js", "prepublishOnly": "npm run check-version && npm run lint && npm test", "regen-package-lock": "rm -rf node_modules package-lock.json; npm install", @@ -70,7 +70,6 @@ "mocha": "^8.1.1", "prettier": "^2.0.5", "rollup": "^2.26.4", - "tslint": "^6.1.3", "typescript": "^4.0.2" }, "dependencies": { diff --git a/packages/lit-element/src/env.d.ts b/packages/lit-element/src/env.d.ts index 3604bb288d..07d3dcefde 100644 --- a/packages/lit-element/src/env.d.ts +++ b/packages/lit-element/src/env.d.ts @@ -25,6 +25,7 @@ interface ShadowRoot { adoptedStyleSheets: CSSStyleSheet[]; } +// eslint-disable-next-line no-var declare var ShadowRoot: {prototype: ShadowRoot; new (): ShadowRoot}; interface CSSStyleSheet { diff --git a/packages/lit-element/src/lib/decorators/base.ts b/packages/lit-element/src/lib/decorators/base.ts index 2307c46beb..da945f493d 100644 --- a/packages/lit-element/src/lib/decorators/base.ts +++ b/packages/lit-element/src/lib/decorators/base.ts @@ -13,7 +13,7 @@ */ export type Constructor = { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any new (...args: any[]): T; }; diff --git a/packages/lit-element/src/lib/decorators/customElement.ts b/packages/lit-element/src/lib/decorators/customElement.ts index ba77a419b4..71813bcfa7 100644 --- a/packages/lit-element/src/lib/decorators/customElement.ts +++ b/packages/lit-element/src/lib/decorators/customElement.ts @@ -30,7 +30,7 @@ const legacyCustomElement = ( // `Constructor` for some reason. // `Constructor` is helpful to make sure the decorator is // applied to elements however. - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return clazz as any; }; diff --git a/packages/lit-element/src/lib/decorators/eventOptions.ts b/packages/lit-element/src/lib/decorators/eventOptions.ts index 3401b87214..6c1fbff696 100644 --- a/packages/lit-element/src/lib/decorators/eventOptions.ts +++ b/packages/lit-element/src/lib/decorators/eventOptions.ts @@ -38,7 +38,7 @@ const standardEventOptions = ( }; const legacyEventOptions = - // tslint:disable-next-line:no-any legacy decorator + // eslint-disable-next-line @typescript-eslint/no-explicit-any (options: AddEventListenerOptions, proto: any, name: PropertyKey) => { Object.assign(proto[name], options); }; @@ -86,5 +86,6 @@ export function eventOptions(options: AddEventListenerOptions) { : standardEventOptions( options, protoOrDescriptor as ClassElement - )) as any; // tslint:disable-next-line:no-any decorator + // eslint-disable-next-line @typescript-eslint/no-explicit-any + )) as any; } diff --git a/packages/lit-element/src/lib/decorators/internalProperty.ts b/packages/lit-element/src/lib/decorators/internalProperty.ts index 07b82fe5df..7c01207c08 100644 --- a/packages/lit-element/src/lib/decorators/internalProperty.ts +++ b/packages/lit-element/src/lib/decorators/internalProperty.ts @@ -22,7 +22,7 @@ import {property} from './property.js'; export type Constructor = { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any new (...args: any[]): T; }; diff --git a/packages/lit-element/src/lib/decorators/property.ts b/packages/lit-element/src/lib/decorators/property.ts index 931b913ad7..a83698aae0 100644 --- a/packages/lit-element/src/lib/decorators/property.ts +++ b/packages/lit-element/src/lib/decorators/property.ts @@ -96,7 +96,7 @@ const legacyProperty = ( * @ExportDecoratedItems */ export function property(options?: PropertyDeclaration) { - // tslint:disable-next-line:no-any decorator + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (protoOrDescriptor: Object | ClassElement, name?: PropertyKey): any => name !== undefined ? legacyProperty(options!, protoOrDescriptor as Object, name) diff --git a/packages/lit-element/src/lib/decorators/query.ts b/packages/lit-element/src/lib/decorators/query.ts index 5459a86e25..b1d3cd0184 100644 --- a/packages/lit-element/src/lib/decorators/query.ts +++ b/packages/lit-element/src/lib/decorators/query.ts @@ -56,8 +56,8 @@ import { export function query(selector: string, cache?: boolean) { return ( protoOrDescriptor: Object | ClassElement, - // tslint:disable-next-line:no-any decorator name?: PropertyKey + // eslint-disable-next-line @typescript-eslint/no-explicit-any ): any => { const descriptor = { get(this: LitElement) { diff --git a/packages/lit-element/src/lib/decorators/queryAll.ts b/packages/lit-element/src/lib/decorators/queryAll.ts index 3e0ecbff9b..835ddb3276 100644 --- a/packages/lit-element/src/lib/decorators/queryAll.ts +++ b/packages/lit-element/src/lib/decorators/queryAll.ts @@ -54,8 +54,8 @@ import { export function queryAll(selector: string) { return ( protoOrDescriptor: Object | ClassElement, - // tslint:disable-next-line:no-any decorator name?: PropertyKey + // eslint-disable-next-line @typescript-eslint/no-explicit-any ): any => { const descriptor = { get(this: LitElement) { diff --git a/packages/lit-element/src/lib/decorators/queryAssignedNodes.ts b/packages/lit-element/src/lib/decorators/queryAssignedNodes.ts index a6a2230bd3..cbcf863646 100644 --- a/packages/lit-element/src/lib/decorators/queryAssignedNodes.ts +++ b/packages/lit-element/src/lib/decorators/queryAssignedNodes.ts @@ -27,7 +27,7 @@ import { } from './base.js'; // x-browser support for matches -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any const ElementProto = Element.prototype as any; const legacyMatches = ElementProto.msMatchesSelector || ElementProto.webkitMatchesSelector; @@ -66,8 +66,8 @@ export function queryAssignedNodes( ) { return ( protoOrDescriptor: Object | ClassElement, - // tslint:disable-next-line:no-any decorator name?: PropertyKey + // eslint-disable-next-line @typescript-eslint/no-explicit-any ): any => { const descriptor = { get(this: LitElement) { diff --git a/packages/lit-element/src/lib/decorators/queryAsync.ts b/packages/lit-element/src/lib/decorators/queryAsync.ts index a51a99e4b7..b40d19dad6 100644 --- a/packages/lit-element/src/lib/decorators/queryAsync.ts +++ b/packages/lit-element/src/lib/decorators/queryAsync.ts @@ -67,8 +67,8 @@ import { export function queryAsync(selector: string) { return ( protoOrDescriptor: Object | ClassElement, - // tslint:disable-next-line:no-any decorator name?: PropertyKey + // eslint-disable-next-line @typescript-eslint/no-explicit-any ): any => { const descriptor = { async get(this: LitElement) { diff --git a/packages/lit-element/src/lib/lit-element-polyfill.ts b/packages/lit-element/src/lib/lit-element-polyfill.ts index f7edfca840..51101feb5f 100644 --- a/packages/lit-element/src/lib/lit-element-polyfill.ts +++ b/packages/lit-element/src/lib/lit-element-polyfill.ts @@ -43,6 +43,7 @@ if (window.ShadyCSS !== undefined && !window.ShadyCSS.nativeShadow) { } }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any (LitElement.prototype as any).adoptStyles = function ( this: LitElement, styles: CSSResultArray diff --git a/packages/lit-element/src/lib/updating-element.ts b/packages/lit-element/src/lib/updating-element.ts index 44507fb763..423c2bdbd0 100644 --- a/packages/lit-element/src/lib/updating-element.ts +++ b/packages/lit-element/src/lib/updating-element.ts @@ -12,6 +12,8 @@ * http://polymer.github.io/PATENTS.txt */ +/* eslint-disable no-prototype-builtins */ + /** * Use this module if you want to create your own base class extending * [[UpdatingElement]]. @@ -142,7 +144,7 @@ type AttributeMap = Map; * Map of changed properties with old values. Takes an optional generic * interface corresponding to the declared element properties. */ -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type PropertyValues = keyof T extends PropertyKey ? Map : never; @@ -348,7 +350,7 @@ export abstract class UpdatingElement extends HTMLElement { options: PropertyDeclaration ) { return { - // tslint:disable-next-line:no-any no symbol in index + // eslint-disable-next-line @typescript-eslint/no-explicit-any get(): any { return (this as {[key: string]: unknown})[key as string]; }, @@ -416,7 +418,7 @@ export abstract class UpdatingElement extends HTMLElement { for (const p of propKeys) { // note, use of `any` is due to TypeSript lack of support for symbol in // index types - // tslint:disable-next-line:no-any no symbol in index + // eslint-disable-next-line @typescript-eslint/no-explicit-any this.createProperty(p, (props as any)[p]); } } @@ -577,7 +579,6 @@ export abstract class UpdatingElement extends HTMLElement { const ctor = this.constructor as typeof UpdatingElement; // Note, hint this as an `AttributeMap` so closure clearly understands // the type; it has issues with tracking types through statics - // tslint:disable-next-line:no-unnecessary-type-assertion const propName = (ctor._attributeToPropertyMap as AttributeMap).get(name); // Use tracking info to avoid reflecting a property value to an attribute // if it was just set because the attribute changed. @@ -585,16 +586,15 @@ export abstract class UpdatingElement extends HTMLElement { const options = ctor.getPropertyOptions(propName); const converter = options.converter; const fromAttribute = - (converter as ComplexAttributeConverter)?.fromAttribute! ?? + (converter as ComplexAttributeConverter)?.fromAttribute ?? (typeof converter === 'function' ? (converter as (value: string | null, type?: unknown) => unknown) : null) ?? defaultConverter.fromAttribute; // mark state reflecting this._reflectingProperty = propName; - this[propName as keyof this] = - // tslint:disable-next-line:no-any - fromAttribute!(value, options.type) as any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this[propName as keyof this] = fromAttribute!(value, options.type) as any; // mark state not reflecting this._reflectingProperty = null; } @@ -699,7 +699,7 @@ export abstract class UpdatingElement extends HTMLElement { if (this._instanceProperties) { // Use forEach so this works even if for/of loops are compiled to for loops // expecting arrays - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any this._instanceProperties!.forEach((v, p) => ((this as any)[p] = v)); this._instanceProperties = undefined; } diff --git a/packages/lit-element/src/test/decorators/eventOptions_test.ts b/packages/lit-element/src/test/decorators/eventOptions_test.ts index 314ef7a82a..8353e231fc 100644 --- a/packages/lit-element/src/test/decorators/eventOptions_test.ts +++ b/packages/lit-element/src/test/decorators/eventOptions_test.ts @@ -17,8 +17,6 @@ import {eventOptions} from '../../lib/decorators/eventOptions.js'; import {generateElementName} from '../test-helpers.js'; import {assert} from '@esm-bundle/chai'; -// tslint:disable:no-any ok in tests - let hasOptions; const supportsOptions = (function () { if (hasOptions !== undefined) { diff --git a/packages/lit-element/src/test/decorators/internalProperty_test.ts b/packages/lit-element/src/test/decorators/internalProperty_test.ts index 2910bd0816..986c6f110c 100644 --- a/packages/lit-element/src/test/decorators/internalProperty_test.ts +++ b/packages/lit-element/src/test/decorators/internalProperty_test.ts @@ -17,8 +17,6 @@ import {internalProperty} from '../../lib/decorators/internalProperty.js'; import {generateElementName} from '../test-helpers.js'; import {assert} from '@esm-bundle/chai'; -// tslint:disable:no-any ok in tests - suite('@internalProperty', () => { let container: HTMLElement; let el: E; diff --git a/packages/lit-element/src/test/decorators/property_test.ts b/packages/lit-element/src/test/decorators/property_test.ts index ec8441eb59..9dcd5e3a4b 100644 --- a/packages/lit-element/src/test/decorators/property_test.ts +++ b/packages/lit-element/src/test/decorators/property_test.ts @@ -23,8 +23,6 @@ import {property} from '../../lib/decorators/property.js'; import {generateElementName} from '../test-helpers.js'; import {assert} from '@esm-bundle/chai'; -// tslint:disable:no-any ok in tests - suite('@property', () => { let container: HTMLElement; @@ -400,10 +398,8 @@ suite('@property', () => { @property({}) bar = 'bar'; - // tslint:disable-next-line:no-any _observedZot?: any; - // tslint:disable-next-line:no-any _observedZot2?: any; // use regular decorator and cast to type diff --git a/packages/lit-element/src/test/decorators/queryAll_test.ts b/packages/lit-element/src/test/decorators/queryAll_test.ts index 11dd704b42..a0e4844e5d 100644 --- a/packages/lit-element/src/test/decorators/queryAll_test.ts +++ b/packages/lit-element/src/test/decorators/queryAll_test.ts @@ -17,8 +17,6 @@ import {queryAll} from '../../lib/decorators/queryAll.js'; import {generateElementName} from '../test-helpers.js'; import {assert} from '@esm-bundle/chai'; -// tslint:disable:no-any ok in tests - suite('@queryAll', () => { let container: HTMLElement; let el: C; diff --git a/packages/lit-element/src/test/decorators/queryAsync_test.ts b/packages/lit-element/src/test/decorators/queryAsync_test.ts index a1b168ee51..b92c567f72 100644 --- a/packages/lit-element/src/test/decorators/queryAsync_test.ts +++ b/packages/lit-element/src/test/decorators/queryAsync_test.ts @@ -17,8 +17,6 @@ import {queryAsync} from '../../lib/decorators/queryAsync.js'; import {generateElementName} from '../test-helpers.js'; import {assert} from '@esm-bundle/chai'; -// tslint:disable:no-any ok in tests - suite('@queryAsync', () => { let container: HTMLElement; let el: C; diff --git a/packages/lit-element/src/test/decorators/query_test.ts b/packages/lit-element/src/test/decorators/query_test.ts index cd2c59604b..92040c5fa8 100644 --- a/packages/lit-element/src/test/decorators/query_test.ts +++ b/packages/lit-element/src/test/decorators/query_test.ts @@ -17,8 +17,6 @@ import {query} from '../../lib/decorators/query.js'; import {generateElementName} from '../test-helpers.js'; import {assert} from '@esm-bundle/chai'; -// tslint:disable:no-any ok in tests - suite('@query', () => { let container: HTMLElement; let el: C; diff --git a/packages/lit-element/src/test/lit-element_styling_test.ts b/packages/lit-element/src/test/lit-element_styling_test.ts index ff06022a14..0687e6b287 100644 --- a/packages/lit-element/src/test/lit-element_styling_test.ts +++ b/packages/lit-element/src/test/lit-element_styling_test.ts @@ -400,7 +400,6 @@ suite('Static get styles', () => { test('`css` get styles throws when unsafe values are used', async () => { assert.throws(() => { - // tslint:disable:no-any intentionally unsafe code css` div { border: ${`2px solid blue;` as any}; diff --git a/packages/lit-element/src/test/lit-element_test.ts b/packages/lit-element/src/test/lit-element_test.ts index b08e4e8828..a5c47c094c 100644 --- a/packages/lit-element/src/test/lit-element_test.ts +++ b/packages/lit-element/src/test/lit-element_test.ts @@ -16,8 +16,6 @@ import {html, LitElement} from '../lit-element.js'; import {generateElementName, stripExpressionComments} from './test-helpers.js'; import {assert} from '@esm-bundle/chai'; -// tslint:disable:no-any ok in tests - suite('LitElement', () => { let container: HTMLElement; @@ -232,6 +230,7 @@ suite('LitElement', () => { customElements.define(generateElementName(), F); const el = new F(); container.appendChild(el); + // eslint-disable-next-line no-empty while (!(await el.updateComplete)) {} assert.equal(el.shadowRoot!.textContent, 'foo'); }); diff --git a/packages/lit-element/src/test/updating-element_test.ts b/packages/lit-element/src/test/updating-element_test.ts index f1fc3b93cf..f408b840b1 100644 --- a/packages/lit-element/src/test/updating-element_test.ts +++ b/packages/lit-element/src/test/updating-element_test.ts @@ -23,8 +23,6 @@ import { import {generateElementName} from './test-helpers.js'; import {assert} from '@esm-bundle/chai'; -// tslint:disable:no-any ok in tests - suite('UpdatingElement', () => { let container: HTMLElement; @@ -1324,6 +1322,7 @@ suite('UpdatingElement', () => { customElements.define(generateElementName(), E); const el = new E(); container.appendChild(el); + // eslint-disable-next-line no-empty while (!(await el.updateComplete)) {} assert.equal(el.foo, 1); assert.equal(el.updateCount, 2); @@ -1783,9 +1782,7 @@ suite('UpdatingElement', () => { foo = 5; bar = 'bar'; - // tslint:disable-next-line:no-any _observedZot?: any; - // tslint:disable-next-line:no-any _observedZot2?: any; zot = ''; @@ -2103,6 +2100,7 @@ suite('UpdatingElement', () => { customElements.define(generateElementName(), E); const el = new E(); container.appendChild(el); + // eslint-disable-next-line no-empty while (!(await el.updateComplete)) {} assert.equal(el.foo, 10); }); diff --git a/packages/lit-element/tslint.json b/packages/lit-element/tslint.json deleted file mode 100644 index 898af7e0aa..0000000000 --- a/packages/lit-element/tslint.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "rules": { - "arrow-parens": true, - "class-name": true, - "indent": [ - true, - "spaces" - ], - "prefer-const": true, - "no-any": true, - "no-duplicate-variable": true, - "no-eval": true, - "no-internal-module": true, - "no-trailing-whitespace": true, - "no-var-keyword": true, - "no-unnecessary-type-assertion": true, - "one-line": [ - true, - "check-open-brace", - "check-whitespace" - ], - "quotemark": [ - true, - "single", - "avoid-escape" - ], - "semicolon": [ - true, - "always" - ], - "trailing-comma": [ - true, - "multiline" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "variable-name": [ - true, - "ban-keywords" - ], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] - } -} diff --git a/packages/lit-html/.gitignore b/packages/lit-html/.gitignore index 24edb33e31..0f76e63fde 100644 --- a/packages/lit-html/.gitignore +++ b/packages/lit-html/.gitignore @@ -1,3 +1,4 @@ +/development/ +/directives/ /lit-html.* /parts.* -/directives/ diff --git a/packages/lit-html/package.json b/packages/lit-html/package.json index 2a6737f7b3..b59f947a68 100644 --- a/packages/lit-html/package.json +++ b/packages/lit-html/package.json @@ -51,6 +51,7 @@ "test:prod": "MODE=prod npm run test:dev", "test:watch": "npm run test:dev -- --watch", "format": "prettier src/* --write", + "lint": "eslint \"**/*.{js,ts}\" --ignore-path .gitignore", "checksize": "rollup -c --environment=CHECKSIZE", "check-version": "node scripts/check-version-tracker.js", "prepublishOnly": "npm run check-version" diff --git a/packages/lit-html/src/directives/unsafe-html.ts b/packages/lit-html/src/directives/unsafe-html.ts index 0744e3c55e..718aa4ea18 100644 --- a/packages/lit-html/src/directives/unsafe-html.ts +++ b/packages/lit-html/src/directives/unsafe-html.ts @@ -63,6 +63,7 @@ export class UnsafeHTML extends Directive { } this.value = value; const strings = ([value] as unknown) as TemplateStringsArray; + // eslint-disable-next-line @typescript-eslint/no-explicit-any (strings as any).raw = strings; // WARNING: impersonating a TemplateResult like this is extremely // dangerous. Third-party directives should not do this. diff --git a/packages/lit-html/src/lit-html.ts b/packages/lit-html/src/lit-html.ts index dbfb70434f..e4bb16cbb2 100644 --- a/packages/lit-html/src/lit-html.ts +++ b/packages/lit-html/src/lit-html.ts @@ -47,6 +47,7 @@ const isPrimitive = (value: unknown): value is Primitive => const isArray = Array.isArray; const isIterable = (value: unknown): value is Iterable => isArray(value) || + // eslint-disable-next-line @typescript-eslint/no-explicit-any (value && typeof (value as any)[Symbol.iterator] === 'function'); // TODO (justinfagnani): can we get away with `\s`? @@ -281,9 +282,11 @@ export const render = ( options?: RenderOptions ) => { const partOwnerNode = options?.renderBefore ?? container; + // eslint-disable-next-line @typescript-eslint/no-explicit-any let part: NodePart = (partOwnerNode as any).$lit$; if (part === undefined) { const endNode = options?.renderBefore ?? null; + // eslint-disable-next-line @typescript-eslint/no-explicit-any (partOwnerNode as any).$lit$ = part = new NodePart( container.insertBefore(createMarker(), endNode), endNode, @@ -978,6 +981,7 @@ export class PropertyPart extends AttributePart { readonly type = PROPERTY_PART; _commitValue(value: unknown) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.element as any)[this.name] = value === nothing ? undefined : value; } } @@ -1072,4 +1076,5 @@ export class EventPart extends AttributePart { // IMPORTANT: do not change the property name or the assignment expression. // This line will be used in regexes to search for lit-html usage. // TODO(justinfagnani): inject version number at build time +// eslint-disable-next-line @typescript-eslint/no-explicit-any ((globalThis as any)['litHtmlVersions'] ??= []).push('2.0.0-pre.3'); diff --git a/packages/lit-html/src/test/directives/guard_test.ts b/packages/lit-html/src/test/directives/guard_test.ts index 57fcd4718e..20ad606dfa 100644 --- a/packages/lit-html/src/test/directives/guard_test.ts +++ b/packages/lit-html/src/test/directives/guard_test.ts @@ -17,8 +17,6 @@ import {guard} from '../../directives/guard.js'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; -/* eslint-disable @typescript-eslint/no-explicit-any */ - suite('guard', () => { let container: HTMLDivElement; diff --git a/packages/lit-html/src/test/directives/live_test.ts b/packages/lit-html/src/test/directives/live_test.ts index e123a22f1c..98919b613e 100644 --- a/packages/lit-html/src/test/directives/live_test.ts +++ b/packages/lit-html/src/test/directives/live_test.ts @@ -16,8 +16,6 @@ import {live} from '../../directives/live.js'; import {html, noChange, nothing, render} from '../../lit-html.js'; import {assert} from '@esm-bundle/chai'; -/* eslint-disable @typescript-eslint/no-explicit-any */ - class LiveTester extends HTMLElement { _x?: string; _setCount = 0; diff --git a/packages/lit-html/src/test/directives/repeat_test.ts b/packages/lit-html/src/test/directives/repeat_test.ts index 6ad73bf4c0..ca9052f257 100644 --- a/packages/lit-html/src/test/directives/repeat_test.ts +++ b/packages/lit-html/src/test/directives/repeat_test.ts @@ -19,8 +19,6 @@ import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; -/* eslint-disable @typescript-eslint/no-explicit-any */ - function assertItemIdentity( oldChildren: HTMLElement[], newChildren: HTMLElement[], diff --git a/packages/lit-html/src/test/directives/style-map_test.ts b/packages/lit-html/src/test/directives/style-map_test.ts index a6944c4b7f..c16255d0b0 100644 --- a/packages/lit-html/src/test/directives/style-map_test.ts +++ b/packages/lit-html/src/test/directives/style-map_test.ts @@ -16,8 +16,6 @@ import {AttributePart, directive, html, render} from '../../lit-html.js'; import {StyleInfo, styleMap} from '../../directives/style-map.js'; import {assert} from '@esm-bundle/chai'; -/* eslint-disable @typescript-eslint/no-explicit-any */ - const ua = window.navigator.userAgent; const isChrome41 = ua.indexOf('Chrome/41') > 0; const isIE = ua.indexOf('Trident/') > 0; diff --git a/packages/lit-html/src/test/directives/template-content_test.ts b/packages/lit-html/src/test/directives/template-content_test.ts index f278e5f298..65698aa80f 100644 --- a/packages/lit-html/src/test/directives/template-content_test.ts +++ b/packages/lit-html/src/test/directives/template-content_test.ts @@ -17,8 +17,6 @@ import {html, render} from '../../lit-html.js'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; -/* eslint-disable @typescript-eslint/no-explicit-any */ - suite('templateContent', () => { let container: HTMLElement; const template = document.createElement('template'); diff --git a/packages/lit-html/src/test/directives/unsafe-html_test.ts b/packages/lit-html/src/test/directives/unsafe-html_test.ts index a0f1e34162..e90cbbcce8 100644 --- a/packages/lit-html/src/test/directives/unsafe-html_test.ts +++ b/packages/lit-html/src/test/directives/unsafe-html_test.ts @@ -17,8 +17,6 @@ import {render, html} from '../../lit-html.js'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; -/* eslint-disable @typescript-eslint/no-explicit-any */ - suite('unsafeHTML directive', () => { let container: HTMLElement; diff --git a/packages/lit-html/src/test/directives/unsafe-svg_test.ts b/packages/lit-html/src/test/directives/unsafe-svg_test.ts index 2fe8ac59d8..650e78dcb1 100644 --- a/packages/lit-html/src/test/directives/unsafe-svg_test.ts +++ b/packages/lit-html/src/test/directives/unsafe-svg_test.ts @@ -17,8 +17,6 @@ import {render, html} from '../../lit-html.js'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; -/* eslint-disable @typescript-eslint/no-explicit-any */ - suite('unsafeSVG', () => { let container: HTMLElement; diff --git a/packages/lit-html/src/test/lit-html_test.ts b/packages/lit-html/src/test/lit-html_test.ts index 118ebac45a..334fa7b9d1 100644 --- a/packages/lit-html/src/test/lit-html_test.ts +++ b/packages/lit-html/src/test/lit-html_test.ts @@ -1176,7 +1176,7 @@ suite('lit-html', () => { event = e; thisValue = this; }; - const eventContext = {} as EventTarget; // eslint-disable-line + const eventContext = {} as EventTarget; render(html`
`, container, {eventContext}); const div = container.querySelector('div')!; div.click(); @@ -1201,7 +1201,7 @@ suite('lit-html', () => { thisValue = this; }, }; - const eventContext = {} as EventTarget; // eslint-disable-line + const eventContext = {} as EventTarget; render(html`
`, container, {eventContext}); const div = container.querySelector('div')!; div.click(); @@ -1251,13 +1251,11 @@ suite('lit-html', () => { div.addEventListener = () => addCount++; div.removeEventListener = () => removeCount++; - // eslint-disable-next-line @typescript-eslint/no-empty-function listener = () => {}; render(t(), container); assert.equal(addCount, 1); assert.equal(removeCount, 0); - // eslint-disable-next-line @typescript-eslint/no-empty-function listener = () => {}; render(t(), container); assert.equal(addCount, 1); @@ -1268,13 +1266,11 @@ suite('lit-html', () => { assert.equal(addCount, 1); assert.equal(removeCount, 1); - // eslint-disable-next-line @typescript-eslint/no-empty-function listener = () => {}; render(t(), container); assert.equal(addCount, 2); assert.equal(removeCount, 1); - // eslint-disable-next-line @typescript-eslint/no-empty-function listener = () => {}; render(t(), container); assert.equal(addCount, 2);