From 875142373eed2e72267c9805b9357d1ba81e014f Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 21 Nov 2020 22:44:44 +0100 Subject: [PATCH] Remove unused files and automate translation fragments (#7764) --- .hound.yml | 6 ----- build-scripts/gulp/translations.js | 19 +++----------- polymer.json | 40 ------------------------------ 3 files changed, 4 insertions(+), 61 deletions(-) delete mode 100644 .hound.yml delete mode 100644 polymer.json diff --git a/.hound.yml b/.hound.yml deleted file mode 100644 index 64d3d21d2c..0000000000 --- a/.hound.yml +++ /dev/null @@ -1,6 +0,0 @@ -jshint: - enabled: false - -eslint: - enabled: true - config_file: .eslintrc-hound.json diff --git a/build-scripts/gulp/translations.js b/build-scripts/gulp/translations.js index e357d38edf..049f1c3dab 100755 --- a/build-scripts/gulp/translations.js +++ b/build-scripts/gulp/translations.js @@ -33,21 +33,10 @@ String.prototype.rsplit = function (sep, maxsplit) { : split; }; -// Panel translations which should be split from the core translations. These -// should mirror the fragment definitions in polymer.json, so that we load -// additional resources at equivalent points. -const TRANSLATION_FRAGMENTS = [ - "config", - "history", - "logbook", - "mailbox", - "profile", - "shopping-list", - "page-authorize", - "page-demo", - "page-onboarding", - "developer-tools", -]; +// Panel translations which should be split from the core translations. +const TRANSLATION_FRAGMENTS = Object.keys( + require("../../src/translations/en.json").ui.panel +); function recursiveFlatten(prefix, data) { let output = {}; diff --git a/polymer.json b/polymer.json deleted file mode 100644 index 430067d045..0000000000 --- a/polymer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "entrypoint": "index.html", - "shell": "src/entrypoints/app.js", - "fragments": [ - "src/panels/config/ha-panel-config.js", - "src/panels/dev-event/ha-panel-dev-event.js", - "src/panels/dev-info/ha-panel-dev-info.js", - "src/panels/dev-mqtt/ha-panel-dev-mqtt.js", - "src/panels/dev-service/ha-panel-dev-service.js", - "src/panels/dev-state/ha-panel-dev-state.js", - "src/panels/dev-template/ha-panel-dev-template.js", - "src/panels/history/ha-panel-history.js", - "src/panels/iframe/ha-panel-iframe.js", - "src/panels/logbook/ha-panel-logbook.js", - "src/panels/map/ha-panel-map.js", - "src/panels/mailbox/ha-panel-mailbox.js", - "hassio/src/entrypoint.js" - ], - "sources": ["src/**/*", "!src/translations/*"], - "lint": { - "rules": ["polymer-3"], - "ignoreWarnings": ["could-not-resolve-reference", "could-not-load"], - "filesToIgnore": [ - "**/*.html", - "**/src/panels/config/js/**/*.js", - "**/ha-iconset-svg.js", - "**/ha-script-editor.js", - "**/ha-automation-editor.js", - "**/ha-big-calendar.js" - ] - }, - "builds": [ - { - "preset": "es5-bundled" - }, - { - "preset": "es6-bundled" - } - ] -}