From 4ad77f3382519c30d5c5cf7ef2bafbec6ece011d Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Sat, 13 Nov 2021 12:51:53 +0100 Subject: [PATCH] DEV: Remove `.es6` extensions from core (#14912) Still supported in plugins though. --- .github/workflows/linting.yml | 8 ++++---- lefthook.yml | 20 +++++-------------- lib/tasks/docker.rake | 2 +- ...{apply-details.js.es6 => apply-details.js} | 0 .../{details.js.es6 => details.js} | 0 plugins/discourse-details/plugin.rb | 1 + ...ton-test.js.es6 => details-button-test.js} | 0 ...ked-test.js.es6 => details-cooked-test.js} | 0 ...6 => discourse-local-dates-create-form.js} | 0 ... => discourse-local-dates-create-modal.js} | 0 ...-dates.js.es6 => discourse-local-dates.js} | 0 ...helper.js.es6 => date-with-zone-helper.js} | 0 ...-dates.js.es6 => discourse-local-dates.js} | 0 ...e-builder.js.es6 => local-date-builder.js} | 0 plugins/discourse-local-dates/plugin.rb | 2 ++ ...-test.js.es6 => download-calendar-test.js} | 0 ...st.js.es6 => local-dates-composer-test.js} | 0 ...t.js.es6 => date-with-zone-helper-test.js} | 0 ...test.js.es6 => local-date-builder-test.js} | 0 ...narrative.js.es6 => new-user-narrative.js} | 0 plugins/discourse-narrative-bot/plugin.rb | 1 + ...ay.js.es6 => composer-presence-display.js} | 0 ...splay.js.es6 => topic-presence-display.js} | 0 ...n-chart.js.es6 => poll-breakdown-chart.js} | 0 ...option.js.es6 => poll-breakdown-option.js} | 0 ...oll-breakdown.js.es6 => poll-breakdown.js} | 0 ...l-ui-builder.js.es6 => poll-ui-builder.js} | 0 ...-builder.js.es6 => add-poll-ui-builder.js} | 0 ...end-for-poll.js.es6 => extend-for-poll.js} | 0 .../{chart-colors.js.es6 => chart-colors.js} | 0 .../{poll.js.es6 => poll.js} | 0 .../lib/{even-round.js.es6 => even-round.js} | 0 ...iscourse-poll.js.es6 => discourse-poll.js} | 0 plugins/poll/plugin.rb | 1 + ...own-test.js.es6 => poll-breakdown-test.js} | 0 ...t.js.es6 => poll-builder-disabled-test.js} | 0 ...st.js.es6 => poll-builder-enabled-test.js} | 0 ...t.js.es6 => poll-in-reply-history-test.js} | 0 ...art-test.js.es6 => poll-pie-chart-test.js} | 0 ...l-quote-test.js.es6 => poll-quote-test.js} | 0 ...sults-test.js.es6 => poll-results-test.js} | 0 ...js.es6 => polls-bar-chart-test-desktop.js} | 0 ....js.es6 => polls-bar-chart-test-mobile.js} | 0 ...er-test.js.es6 => poll-ui-builder-test.js} | 0 ....js.es6 => display-poll-builder-button.js} | 0 ...t.js.es6 => discourse-poll-option-test.js} | 0 ...> discourse-poll-standard-results-test.js} | 0 ...oll-test.js.es6 => discourse-poll-test.js} | 0 ...{color-example.js.es6 => color-example.js} | 0 ...e-example.js.es6 => styleguide-example.js} | 0 ...guide-icons.js.es6 => styleguide-icons.js} | 0 ...leguide-link.js.es6 => styleguide-link.js} | 0 ...markdown.js.es6 => styleguide-markdown.js} | 0 ...e-section.js.es6 => styleguide-section.js} | 0 ...leguide-show.js.es6 => styleguide-show.js} | 0 .../{styleguide.js.es6 => styleguide.js} | 0 ...{section-title.js.es6 => section-title.js} | 0 .../lib/{dummy-data.js.es6 => dummy-data.js} | 0 .../lib/{styleguide.js.es6 => styleguide.js} | 0 ...leguide-show.js.es6 => styleguide-show.js} | 0 .../{styleguide.js.es6 => styleguide.js} | 0 ...ute-map.js.es6 => styleguide-route-map.js} | 0 plugins/styleguide/plugin.rb | 1 + 63 files changed, 16 insertions(+), 20 deletions(-) rename plugins/discourse-details/assets/javascripts/initializers/{apply-details.js.es6 => apply-details.js} (100%) rename plugins/discourse-details/assets/javascripts/lib/discourse-markdown/{details.js.es6 => details.js} (100%) rename plugins/discourse-details/test/javascripts/acceptance/{details-button-test.js.es6 => details-button-test.js} (100%) rename plugins/discourse-details/test/javascripts/lib/{details-cooked-test.js.es6 => details-cooked-test.js} (100%) rename plugins/discourse-local-dates/assets/javascripts/discourse/components/{discourse-local-dates-create-form.js.es6 => discourse-local-dates-create-form.js} (100%) rename plugins/discourse-local-dates/assets/javascripts/discourse/controllers/{discourse-local-dates-create-modal.js.es6 => discourse-local-dates-create-modal.js} (100%) rename plugins/discourse-local-dates/assets/javascripts/initializers/{discourse-local-dates.js.es6 => discourse-local-dates.js} (100%) rename plugins/discourse-local-dates/assets/javascripts/lib/{date-with-zone-helper.js.es6 => date-with-zone-helper.js} (100%) rename plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/{discourse-local-dates.js.es6 => discourse-local-dates.js} (100%) rename plugins/discourse-local-dates/assets/javascripts/lib/{local-date-builder.js.es6 => local-date-builder.js} (100%) rename plugins/discourse-local-dates/test/javascripts/acceptance/{download-calendar-test.js.es6 => download-calendar-test.js} (100%) rename plugins/discourse-local-dates/test/javascripts/acceptance/{local-dates-composer-test.js.es6 => local-dates-composer-test.js} (100%) rename plugins/discourse-local-dates/test/javascripts/lib/{date-with-zone-helper-test.js.es6 => date-with-zone-helper-test.js} (100%) rename plugins/discourse-local-dates/test/javascripts/lib/{local-date-builder-test.js.es6 => local-date-builder-test.js} (100%) rename plugins/discourse-narrative-bot/assets/javascripts/initializers/{new-user-narrative.js.es6 => new-user-narrative.js} (100%) rename plugins/discourse-presence/assets/javascripts/discourse/components/{composer-presence-display.js.es6 => composer-presence-display.js} (100%) rename plugins/discourse-presence/assets/javascripts/discourse/components/{topic-presence-display.js.es6 => topic-presence-display.js} (100%) rename plugins/poll/assets/javascripts/components/{poll-breakdown-chart.js.es6 => poll-breakdown-chart.js} (100%) rename plugins/poll/assets/javascripts/components/{poll-breakdown-option.js.es6 => poll-breakdown-option.js} (100%) rename plugins/poll/assets/javascripts/controllers/{poll-breakdown.js.es6 => poll-breakdown.js} (100%) rename plugins/poll/assets/javascripts/controllers/{poll-ui-builder.js.es6 => poll-ui-builder.js} (100%) rename plugins/poll/assets/javascripts/initializers/{add-poll-ui-builder.js.es6 => add-poll-ui-builder.js} (100%) rename plugins/poll/assets/javascripts/initializers/{extend-for-poll.js.es6 => extend-for-poll.js} (100%) rename plugins/poll/assets/javascripts/lib/{chart-colors.js.es6 => chart-colors.js} (100%) rename plugins/poll/assets/javascripts/lib/discourse-markdown/{poll.js.es6 => poll.js} (100%) rename plugins/poll/assets/javascripts/lib/{even-round.js.es6 => even-round.js} (100%) rename plugins/poll/assets/javascripts/widgets/{discourse-poll.js.es6 => discourse-poll.js} (100%) rename plugins/poll/test/javascripts/acceptance/{poll-breakdown-test.js.es6 => poll-breakdown-test.js} (100%) rename plugins/poll/test/javascripts/acceptance/{poll-builder-disabled-test.js.es6 => poll-builder-disabled-test.js} (100%) rename plugins/poll/test/javascripts/acceptance/{poll-builder-enabled-test.js.es6 => poll-builder-enabled-test.js} (100%) rename plugins/poll/test/javascripts/acceptance/{poll-in-reply-history-test.js.es6 => poll-in-reply-history-test.js} (100%) rename plugins/poll/test/javascripts/acceptance/{poll-pie-chart-test.js.es6 => poll-pie-chart-test.js} (100%) rename plugins/poll/test/javascripts/acceptance/{poll-quote-test.js.es6 => poll-quote-test.js} (100%) rename plugins/poll/test/javascripts/acceptance/{poll-results-test.js.es6 => poll-results-test.js} (100%) rename plugins/poll/test/javascripts/acceptance/{polls-bar-chart-test-desktop.js.es6 => polls-bar-chart-test-desktop.js} (100%) rename plugins/poll/test/javascripts/acceptance/{polls-bar-chart-test-mobile.js.es6 => polls-bar-chart-test-mobile.js} (100%) rename plugins/poll/test/javascripts/controllers/{poll-ui-builder-test.js.es6 => poll-ui-builder-test.js} (100%) rename plugins/poll/test/javascripts/helpers/{display-poll-builder-button.js.es6 => display-poll-builder-button.js} (100%) rename plugins/poll/test/javascripts/widgets/{discourse-poll-option-test.js.es6 => discourse-poll-option-test.js} (100%) rename plugins/poll/test/javascripts/widgets/{discourse-poll-standard-results-test.js.es6 => discourse-poll-standard-results-test.js} (100%) rename plugins/poll/test/javascripts/widgets/{discourse-poll-test.js.es6 => discourse-poll-test.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/components/{color-example.js.es6 => color-example.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/components/{styleguide-example.js.es6 => styleguide-example.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/components/{styleguide-icons.js.es6 => styleguide-icons.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/components/{styleguide-link.js.es6 => styleguide-link.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/components/{styleguide-markdown.js.es6 => styleguide-markdown.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/components/{styleguide-section.js.es6 => styleguide-section.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/controllers/{styleguide-show.js.es6 => styleguide-show.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/controllers/{styleguide.js.es6 => styleguide.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/helpers/{section-title.js.es6 => section-title.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/lib/{dummy-data.js.es6 => dummy-data.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/lib/{styleguide.js.es6 => styleguide.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/routes/{styleguide-show.js.es6 => styleguide-show.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/routes/{styleguide.js.es6 => styleguide.js} (100%) rename plugins/styleguide/assets/javascripts/discourse/{styleguide-route-map.js.es6 => styleguide-route-map.js} (100%) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index f1ca33ad327..ac5b712d03a 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -61,11 +61,11 @@ jobs: - name: ESLint (core) if: ${{ always() }} - run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern app/assets/javascripts + run: yarn eslint app/assets/javascripts - name: ESLint (core plugins) if: ${{ always() }} - run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern plugins/**/{test,assets}/javascripts + run: yarn eslint plugins - name: Prettier if: ${{ always() }} @@ -73,9 +73,9 @@ jobs: yarn prettier -v yarn prettier --list-different \ "app/assets/stylesheets/**/*.scss" \ - "app/assets/javascripts/**/*.{js,es6}" \ + "app/assets/javascripts/**/*.js" \ "plugins/**/assets/stylesheets/**/*.scss" \ - "plugins/**/assets/javascripts/**/*.{js,es6}" + "plugins/**/assets/javascripts/**/*.js" - name: Ember template lint if: ${{ always() }} diff --git a/lefthook.yml b/lefthook.yml index b5e3a773970..534e33e87bd 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -5,14 +5,10 @@ pre-commit: glob: "*.rb" run: bundle exec rubocop --parallel {staged_files} prettier: - glob: "*.{js,es6}" + glob: "*.js" include: "app/assets/javascripts|test/javascripts" run: yarn pprettier --list-different {staged_files} - eslint-es6: - glob: "*.es6" - include: "app/assets/javascripts|test/javascripts" - run: yarn eslint --ext .es6 -f compact {staged_files} - eslint-js: + eslint: glob: "*.js" include: "app/assets/javascripts|test/javascripts" run: yarn eslint -f compact {staged_files} @@ -52,23 +48,17 @@ lints: rubocop: run: bundle exec rubocop --parallel prettier: - glob: "*.{js,es6}" + glob: "*.js" include: "app/assets/javascripts|test/javascripts" run: yarn pprettier --list-different {all_files} - eslint-assets-es6: - run: yarn eslint --ext .es6 app/assets/javascripts eslint-assets-js: run: yarn eslint app/assets/javascripts - eslint-test-es6: - run: yarn eslint --ext .es6 test/javascripts eslint-test-js: run: yarn eslint test/javascripts eslint-plugins-assets: - run: yarn eslint --global I18n --ext .es6 plugins/**/assets/javascripts + run: yarn eslint plugins/**/assets/javascripts eslint-plugins-test: - run: yarn eslint --global I18n --ext .es6 plugins/**/test/javascripts - eslint-assets-tests: - run: yarn eslint app/assets/javascripts test/javascripts + run: yarn eslint plugins/**/test/javascripts i18n-lint: glob: "**/{client,server}.en.yml" run: bundle exec ruby script/i18n_lint.rb {all_files} diff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rake index e078e5b28b3..1e712e53b9e 100644 --- a/lib/tasks/docker.rake +++ b/lib/tasks/docker.rake @@ -87,7 +87,7 @@ task 'docker:test' do unless ENV["SKIP_CORE"] puts "Listing prettier offenses in core:" - @good &&= run_or_fail('yarn prettier --list-different "app/assets/stylesheets/**/*.scss" "app/assets/javascripts/**/*.{js,es6}"') + @good &&= run_or_fail('yarn prettier --list-different "app/assets/stylesheets/**/*.scss" "app/assets/javascripts/**/*.js"') end unless ENV["SKIP_PLUGINS"] diff --git a/plugins/discourse-details/assets/javascripts/initializers/apply-details.js.es6 b/plugins/discourse-details/assets/javascripts/initializers/apply-details.js similarity index 100% rename from plugins/discourse-details/assets/javascripts/initializers/apply-details.js.es6 rename to plugins/discourse-details/assets/javascripts/initializers/apply-details.js diff --git a/plugins/discourse-details/assets/javascripts/lib/discourse-markdown/details.js.es6 b/plugins/discourse-details/assets/javascripts/lib/discourse-markdown/details.js similarity index 100% rename from plugins/discourse-details/assets/javascripts/lib/discourse-markdown/details.js.es6 rename to plugins/discourse-details/assets/javascripts/lib/discourse-markdown/details.js diff --git a/plugins/discourse-details/plugin.rb b/plugins/discourse-details/plugin.rb index 130bd58a325..9903bb861db 100644 --- a/plugins/discourse-details/plugin.rb +++ b/plugins/discourse-details/plugin.rb @@ -5,6 +5,7 @@ # version: 0.4 # authors: Régis Hanol # url: https://github.com/discourse/discourse/tree/main/plugins/discourse-details +# transpile_js: true enabled_site_setting :details_enabled hide_plugin if self.respond_to?(:hide_plugin) diff --git a/plugins/discourse-details/test/javascripts/acceptance/details-button-test.js.es6 b/plugins/discourse-details/test/javascripts/acceptance/details-button-test.js similarity index 100% rename from plugins/discourse-details/test/javascripts/acceptance/details-button-test.js.es6 rename to plugins/discourse-details/test/javascripts/acceptance/details-button-test.js diff --git a/plugins/discourse-details/test/javascripts/lib/details-cooked-test.js.es6 b/plugins/discourse-details/test/javascripts/lib/details-cooked-test.js similarity index 100% rename from plugins/discourse-details/test/javascripts/lib/details-cooked-test.js.es6 rename to plugins/discourse-details/test/javascripts/lib/details-cooked-test.js diff --git a/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js.es6 b/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js similarity index 100% rename from plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js.es6 rename to plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js diff --git a/plugins/discourse-local-dates/assets/javascripts/discourse/controllers/discourse-local-dates-create-modal.js.es6 b/plugins/discourse-local-dates/assets/javascripts/discourse/controllers/discourse-local-dates-create-modal.js similarity index 100% rename from plugins/discourse-local-dates/assets/javascripts/discourse/controllers/discourse-local-dates-create-modal.js.es6 rename to plugins/discourse-local-dates/assets/javascripts/discourse/controllers/discourse-local-dates-create-modal.js diff --git a/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js.es6 b/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js similarity index 100% rename from plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js.es6 rename to plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js diff --git a/plugins/discourse-local-dates/assets/javascripts/lib/date-with-zone-helper.js.es6 b/plugins/discourse-local-dates/assets/javascripts/lib/date-with-zone-helper.js similarity index 100% rename from plugins/discourse-local-dates/assets/javascripts/lib/date-with-zone-helper.js.es6 rename to plugins/discourse-local-dates/assets/javascripts/lib/date-with-zone-helper.js diff --git a/plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/discourse-local-dates.js.es6 b/plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/discourse-local-dates.js similarity index 100% rename from plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/discourse-local-dates.js.es6 rename to plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/discourse-local-dates.js diff --git a/plugins/discourse-local-dates/assets/javascripts/lib/local-date-builder.js.es6 b/plugins/discourse-local-dates/assets/javascripts/lib/local-date-builder.js similarity index 100% rename from plugins/discourse-local-dates/assets/javascripts/lib/local-date-builder.js.es6 rename to plugins/discourse-local-dates/assets/javascripts/lib/local-date-builder.js diff --git a/plugins/discourse-local-dates/plugin.rb b/plugins/discourse-local-dates/plugin.rb index b4fdae639fc..32961189f71 100644 --- a/plugins/discourse-local-dates/plugin.rb +++ b/plugins/discourse-local-dates/plugin.rb @@ -4,6 +4,8 @@ # about: Display a date in your local timezone # version: 0.1 # author: Joffrey Jaffeux +# transpile_js: true + hide_plugin if self.respond_to?(:hide_plugin) register_asset 'stylesheets/common/discourse-local-dates.scss' diff --git a/plugins/discourse-local-dates/test/javascripts/acceptance/download-calendar-test.js.es6 b/plugins/discourse-local-dates/test/javascripts/acceptance/download-calendar-test.js similarity index 100% rename from plugins/discourse-local-dates/test/javascripts/acceptance/download-calendar-test.js.es6 rename to plugins/discourse-local-dates/test/javascripts/acceptance/download-calendar-test.js diff --git a/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-composer-test.js.es6 b/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-composer-test.js similarity index 100% rename from plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-composer-test.js.es6 rename to plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-composer-test.js diff --git a/plugins/discourse-local-dates/test/javascripts/lib/date-with-zone-helper-test.js.es6 b/plugins/discourse-local-dates/test/javascripts/lib/date-with-zone-helper-test.js similarity index 100% rename from plugins/discourse-local-dates/test/javascripts/lib/date-with-zone-helper-test.js.es6 rename to plugins/discourse-local-dates/test/javascripts/lib/date-with-zone-helper-test.js diff --git a/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js.es6 b/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js similarity index 100% rename from plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js.es6 rename to plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js diff --git a/plugins/discourse-narrative-bot/assets/javascripts/initializers/new-user-narrative.js.es6 b/plugins/discourse-narrative-bot/assets/javascripts/initializers/new-user-narrative.js similarity index 100% rename from plugins/discourse-narrative-bot/assets/javascripts/initializers/new-user-narrative.js.es6 rename to plugins/discourse-narrative-bot/assets/javascripts/initializers/new-user-narrative.js diff --git a/plugins/discourse-narrative-bot/plugin.rb b/plugins/discourse-narrative-bot/plugin.rb index 5bda9a65ea3..2748dc9bc54 100644 --- a/plugins/discourse-narrative-bot/plugin.rb +++ b/plugins/discourse-narrative-bot/plugin.rb @@ -5,6 +5,7 @@ # version: 1.0 # authors: Nick Sahler, Alan Tan # url: https://github.com/discourse/discourse/tree/main/plugins/discourse-narrative-bot +# transpile_js: true enabled_site_setting :discourse_narrative_bot_enabled hide_plugin if self.respond_to?(:hide_plugin) diff --git a/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 b/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js similarity index 100% rename from plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 rename to plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js diff --git a/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6 b/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js similarity index 100% rename from plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6 rename to plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js diff --git a/plugins/poll/assets/javascripts/components/poll-breakdown-chart.js.es6 b/plugins/poll/assets/javascripts/components/poll-breakdown-chart.js similarity index 100% rename from plugins/poll/assets/javascripts/components/poll-breakdown-chart.js.es6 rename to plugins/poll/assets/javascripts/components/poll-breakdown-chart.js diff --git a/plugins/poll/assets/javascripts/components/poll-breakdown-option.js.es6 b/plugins/poll/assets/javascripts/components/poll-breakdown-option.js similarity index 100% rename from plugins/poll/assets/javascripts/components/poll-breakdown-option.js.es6 rename to plugins/poll/assets/javascripts/components/poll-breakdown-option.js diff --git a/plugins/poll/assets/javascripts/controllers/poll-breakdown.js.es6 b/plugins/poll/assets/javascripts/controllers/poll-breakdown.js similarity index 100% rename from plugins/poll/assets/javascripts/controllers/poll-breakdown.js.es6 rename to plugins/poll/assets/javascripts/controllers/poll-breakdown.js diff --git a/plugins/poll/assets/javascripts/controllers/poll-ui-builder.js.es6 b/plugins/poll/assets/javascripts/controllers/poll-ui-builder.js similarity index 100% rename from plugins/poll/assets/javascripts/controllers/poll-ui-builder.js.es6 rename to plugins/poll/assets/javascripts/controllers/poll-ui-builder.js diff --git a/plugins/poll/assets/javascripts/initializers/add-poll-ui-builder.js.es6 b/plugins/poll/assets/javascripts/initializers/add-poll-ui-builder.js similarity index 100% rename from plugins/poll/assets/javascripts/initializers/add-poll-ui-builder.js.es6 rename to plugins/poll/assets/javascripts/initializers/add-poll-ui-builder.js diff --git a/plugins/poll/assets/javascripts/initializers/extend-for-poll.js.es6 b/plugins/poll/assets/javascripts/initializers/extend-for-poll.js similarity index 100% rename from plugins/poll/assets/javascripts/initializers/extend-for-poll.js.es6 rename to plugins/poll/assets/javascripts/initializers/extend-for-poll.js diff --git a/plugins/poll/assets/javascripts/lib/chart-colors.js.es6 b/plugins/poll/assets/javascripts/lib/chart-colors.js similarity index 100% rename from plugins/poll/assets/javascripts/lib/chart-colors.js.es6 rename to plugins/poll/assets/javascripts/lib/chart-colors.js diff --git a/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js.es6 b/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js similarity index 100% rename from plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js.es6 rename to plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js diff --git a/plugins/poll/assets/javascripts/lib/even-round.js.es6 b/plugins/poll/assets/javascripts/lib/even-round.js similarity index 100% rename from plugins/poll/assets/javascripts/lib/even-round.js.es6 rename to plugins/poll/assets/javascripts/lib/even-round.js diff --git a/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6 b/plugins/poll/assets/javascripts/widgets/discourse-poll.js similarity index 100% rename from plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6 rename to plugins/poll/assets/javascripts/widgets/discourse-poll.js diff --git a/plugins/poll/plugin.rb b/plugins/poll/plugin.rb index de3c8a18ecc..078d40c0ec7 100644 --- a/plugins/poll/plugin.rb +++ b/plugins/poll/plugin.rb @@ -5,6 +5,7 @@ # version: 1.0 # authors: Vikhyat Korrapati (vikhyat), Régis Hanol (zogstrip) # url: https://github.com/discourse/discourse/tree/main/plugins/poll +# transpile_js: true register_asset "stylesheets/common/poll.scss" register_asset "stylesheets/desktop/poll.scss", :desktop diff --git a/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js similarity index 100% rename from plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js.es6 rename to plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js diff --git a/plugins/poll/test/javascripts/acceptance/poll-builder-disabled-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-builder-disabled-test.js similarity index 100% rename from plugins/poll/test/javascripts/acceptance/poll-builder-disabled-test.js.es6 rename to plugins/poll/test/javascripts/acceptance/poll-builder-disabled-test.js diff --git a/plugins/poll/test/javascripts/acceptance/poll-builder-enabled-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-builder-enabled-test.js similarity index 100% rename from plugins/poll/test/javascripts/acceptance/poll-builder-enabled-test.js.es6 rename to plugins/poll/test/javascripts/acceptance/poll-builder-enabled-test.js diff --git a/plugins/poll/test/javascripts/acceptance/poll-in-reply-history-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-in-reply-history-test.js similarity index 100% rename from plugins/poll/test/javascripts/acceptance/poll-in-reply-history-test.js.es6 rename to plugins/poll/test/javascripts/acceptance/poll-in-reply-history-test.js diff --git a/plugins/poll/test/javascripts/acceptance/poll-pie-chart-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-pie-chart-test.js similarity index 100% rename from plugins/poll/test/javascripts/acceptance/poll-pie-chart-test.js.es6 rename to plugins/poll/test/javascripts/acceptance/poll-pie-chart-test.js diff --git a/plugins/poll/test/javascripts/acceptance/poll-quote-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-quote-test.js similarity index 100% rename from plugins/poll/test/javascripts/acceptance/poll-quote-test.js.es6 rename to plugins/poll/test/javascripts/acceptance/poll-quote-test.js diff --git a/plugins/poll/test/javascripts/acceptance/poll-results-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-results-test.js similarity index 100% rename from plugins/poll/test/javascripts/acceptance/poll-results-test.js.es6 rename to plugins/poll/test/javascripts/acceptance/poll-results-test.js diff --git a/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-desktop.js.es6 b/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-desktop.js similarity index 100% rename from plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-desktop.js.es6 rename to plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-desktop.js diff --git a/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-mobile.js.es6 b/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-mobile.js similarity index 100% rename from plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-mobile.js.es6 rename to plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-mobile.js diff --git a/plugins/poll/test/javascripts/controllers/poll-ui-builder-test.js.es6 b/plugins/poll/test/javascripts/controllers/poll-ui-builder-test.js similarity index 100% rename from plugins/poll/test/javascripts/controllers/poll-ui-builder-test.js.es6 rename to plugins/poll/test/javascripts/controllers/poll-ui-builder-test.js diff --git a/plugins/poll/test/javascripts/helpers/display-poll-builder-button.js.es6 b/plugins/poll/test/javascripts/helpers/display-poll-builder-button.js similarity index 100% rename from plugins/poll/test/javascripts/helpers/display-poll-builder-button.js.es6 rename to plugins/poll/test/javascripts/helpers/display-poll-builder-button.js diff --git a/plugins/poll/test/javascripts/widgets/discourse-poll-option-test.js.es6 b/plugins/poll/test/javascripts/widgets/discourse-poll-option-test.js similarity index 100% rename from plugins/poll/test/javascripts/widgets/discourse-poll-option-test.js.es6 rename to plugins/poll/test/javascripts/widgets/discourse-poll-option-test.js diff --git a/plugins/poll/test/javascripts/widgets/discourse-poll-standard-results-test.js.es6 b/plugins/poll/test/javascripts/widgets/discourse-poll-standard-results-test.js similarity index 100% rename from plugins/poll/test/javascripts/widgets/discourse-poll-standard-results-test.js.es6 rename to plugins/poll/test/javascripts/widgets/discourse-poll-standard-results-test.js diff --git a/plugins/poll/test/javascripts/widgets/discourse-poll-test.js.es6 b/plugins/poll/test/javascripts/widgets/discourse-poll-test.js similarity index 100% rename from plugins/poll/test/javascripts/widgets/discourse-poll-test.js.es6 rename to plugins/poll/test/javascripts/widgets/discourse-poll-test.js diff --git a/plugins/styleguide/assets/javascripts/discourse/components/color-example.js.es6 b/plugins/styleguide/assets/javascripts/discourse/components/color-example.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/components/color-example.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/components/color-example.js diff --git a/plugins/styleguide/assets/javascripts/discourse/components/styleguide-example.js.es6 b/plugins/styleguide/assets/javascripts/discourse/components/styleguide-example.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/components/styleguide-example.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/components/styleguide-example.js diff --git a/plugins/styleguide/assets/javascripts/discourse/components/styleguide-icons.js.es6 b/plugins/styleguide/assets/javascripts/discourse/components/styleguide-icons.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/components/styleguide-icons.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/components/styleguide-icons.js diff --git a/plugins/styleguide/assets/javascripts/discourse/components/styleguide-link.js.es6 b/plugins/styleguide/assets/javascripts/discourse/components/styleguide-link.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/components/styleguide-link.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/components/styleguide-link.js diff --git a/plugins/styleguide/assets/javascripts/discourse/components/styleguide-markdown.js.es6 b/plugins/styleguide/assets/javascripts/discourse/components/styleguide-markdown.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/components/styleguide-markdown.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/components/styleguide-markdown.js diff --git a/plugins/styleguide/assets/javascripts/discourse/components/styleguide-section.js.es6 b/plugins/styleguide/assets/javascripts/discourse/components/styleguide-section.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/components/styleguide-section.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/components/styleguide-section.js diff --git a/plugins/styleguide/assets/javascripts/discourse/controllers/styleguide-show.js.es6 b/plugins/styleguide/assets/javascripts/discourse/controllers/styleguide-show.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/controllers/styleguide-show.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/controllers/styleguide-show.js diff --git a/plugins/styleguide/assets/javascripts/discourse/controllers/styleguide.js.es6 b/plugins/styleguide/assets/javascripts/discourse/controllers/styleguide.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/controllers/styleguide.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/controllers/styleguide.js diff --git a/plugins/styleguide/assets/javascripts/discourse/helpers/section-title.js.es6 b/plugins/styleguide/assets/javascripts/discourse/helpers/section-title.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/helpers/section-title.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/helpers/section-title.js diff --git a/plugins/styleguide/assets/javascripts/discourse/lib/dummy-data.js.es6 b/plugins/styleguide/assets/javascripts/discourse/lib/dummy-data.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/lib/dummy-data.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/lib/dummy-data.js diff --git a/plugins/styleguide/assets/javascripts/discourse/lib/styleguide.js.es6 b/plugins/styleguide/assets/javascripts/discourse/lib/styleguide.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/lib/styleguide.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/lib/styleguide.js diff --git a/plugins/styleguide/assets/javascripts/discourse/routes/styleguide-show.js.es6 b/plugins/styleguide/assets/javascripts/discourse/routes/styleguide-show.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/routes/styleguide-show.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/routes/styleguide-show.js diff --git a/plugins/styleguide/assets/javascripts/discourse/routes/styleguide.js.es6 b/plugins/styleguide/assets/javascripts/discourse/routes/styleguide.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/routes/styleguide.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/routes/styleguide.js diff --git a/plugins/styleguide/assets/javascripts/discourse/styleguide-route-map.js.es6 b/plugins/styleguide/assets/javascripts/discourse/styleguide-route-map.js similarity index 100% rename from plugins/styleguide/assets/javascripts/discourse/styleguide-route-map.js.es6 rename to plugins/styleguide/assets/javascripts/discourse/styleguide-route-map.js diff --git a/plugins/styleguide/plugin.rb b/plugins/styleguide/plugin.rb index 4c3244b1f67..f90169de17b 100644 --- a/plugins/styleguide/plugin.rb +++ b/plugins/styleguide/plugin.rb @@ -4,6 +4,7 @@ # about: Preview how Widgets are Styled in Discourse # version: 0.2 # author: Robin Ward +# transpile_js: true register_asset "stylesheets/styleguide.scss" enabled_site_setting :styleguide_enabled