DEV: Remove .es6 extensions from core (#14912)

Still supported in plugins though.
This commit is contained in:
Jarek Radosz 2021-11-13 12:51:53 +01:00 committed by GitHub
parent cb3cb96149
commit 4ad77f3382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
63 changed files with 16 additions and 20 deletions

View File

@ -61,11 +61,11 @@ jobs:
- name: ESLint (core) - name: ESLint (core)
if: ${{ always() }} 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) - name: ESLint (core plugins)
if: ${{ always() }} if: ${{ always() }}
run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern plugins/**/{test,assets}/javascripts run: yarn eslint plugins
- name: Prettier - name: Prettier
if: ${{ always() }} if: ${{ always() }}
@ -73,9 +73,9 @@ jobs:
yarn prettier -v yarn prettier -v
yarn prettier --list-different \ yarn prettier --list-different \
"app/assets/stylesheets/**/*.scss" \ "app/assets/stylesheets/**/*.scss" \
"app/assets/javascripts/**/*.{js,es6}" \ "app/assets/javascripts/**/*.js" \
"plugins/**/assets/stylesheets/**/*.scss" \ "plugins/**/assets/stylesheets/**/*.scss" \
"plugins/**/assets/javascripts/**/*.{js,es6}" "plugins/**/assets/javascripts/**/*.js"
- name: Ember template lint - name: Ember template lint
if: ${{ always() }} if: ${{ always() }}

View File

@ -5,14 +5,10 @@ pre-commit:
glob: "*.rb" glob: "*.rb"
run: bundle exec rubocop --parallel {staged_files} run: bundle exec rubocop --parallel {staged_files}
prettier: prettier:
glob: "*.{js,es6}" glob: "*.js"
include: "app/assets/javascripts|test/javascripts" include: "app/assets/javascripts|test/javascripts"
run: yarn pprettier --list-different {staged_files} run: yarn pprettier --list-different {staged_files}
eslint-es6: eslint:
glob: "*.es6"
include: "app/assets/javascripts|test/javascripts"
run: yarn eslint --ext .es6 -f compact {staged_files}
eslint-js:
glob: "*.js" glob: "*.js"
include: "app/assets/javascripts|test/javascripts" include: "app/assets/javascripts|test/javascripts"
run: yarn eslint -f compact {staged_files} run: yarn eslint -f compact {staged_files}
@ -52,23 +48,17 @@ lints:
rubocop: rubocop:
run: bundle exec rubocop --parallel run: bundle exec rubocop --parallel
prettier: prettier:
glob: "*.{js,es6}" glob: "*.js"
include: "app/assets/javascripts|test/javascripts" include: "app/assets/javascripts|test/javascripts"
run: yarn pprettier --list-different {all_files} run: yarn pprettier --list-different {all_files}
eslint-assets-es6:
run: yarn eslint --ext .es6 app/assets/javascripts
eslint-assets-js: eslint-assets-js:
run: yarn eslint app/assets/javascripts run: yarn eslint app/assets/javascripts
eslint-test-es6:
run: yarn eslint --ext .es6 test/javascripts
eslint-test-js: eslint-test-js:
run: yarn eslint test/javascripts run: yarn eslint test/javascripts
eslint-plugins-assets: eslint-plugins-assets:
run: yarn eslint --global I18n --ext .es6 plugins/**/assets/javascripts run: yarn eslint plugins/**/assets/javascripts
eslint-plugins-test: eslint-plugins-test:
run: yarn eslint --global I18n --ext .es6 plugins/**/test/javascripts run: yarn eslint plugins/**/test/javascripts
eslint-assets-tests:
run: yarn eslint app/assets/javascripts test/javascripts
i18n-lint: i18n-lint:
glob: "**/{client,server}.en.yml" glob: "**/{client,server}.en.yml"
run: bundle exec ruby script/i18n_lint.rb {all_files} run: bundle exec ruby script/i18n_lint.rb {all_files}

View File

@ -87,7 +87,7 @@ task 'docker:test' do
unless ENV["SKIP_CORE"] unless ENV["SKIP_CORE"]
puts "Listing prettier offenses in 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 end
unless ENV["SKIP_PLUGINS"] unless ENV["SKIP_PLUGINS"]

View File

@ -5,6 +5,7 @@
# version: 0.4 # version: 0.4
# authors: Régis Hanol # authors: Régis Hanol
# url: https://github.com/discourse/discourse/tree/main/plugins/discourse-details # url: https://github.com/discourse/discourse/tree/main/plugins/discourse-details
# transpile_js: true
enabled_site_setting :details_enabled enabled_site_setting :details_enabled
hide_plugin if self.respond_to?(:hide_plugin) hide_plugin if self.respond_to?(:hide_plugin)

View File

@ -4,6 +4,8 @@
# about: Display a date in your local timezone # about: Display a date in your local timezone
# version: 0.1 # version: 0.1
# author: Joffrey Jaffeux # author: Joffrey Jaffeux
# transpile_js: true
hide_plugin if self.respond_to?(:hide_plugin) hide_plugin if self.respond_to?(:hide_plugin)
register_asset 'stylesheets/common/discourse-local-dates.scss' register_asset 'stylesheets/common/discourse-local-dates.scss'

View File

@ -5,6 +5,7 @@
# version: 1.0 # version: 1.0
# authors: Nick Sahler, Alan Tan # authors: Nick Sahler, Alan Tan
# url: https://github.com/discourse/discourse/tree/main/plugins/discourse-narrative-bot # url: https://github.com/discourse/discourse/tree/main/plugins/discourse-narrative-bot
# transpile_js: true
enabled_site_setting :discourse_narrative_bot_enabled enabled_site_setting :discourse_narrative_bot_enabled
hide_plugin if self.respond_to?(:hide_plugin) hide_plugin if self.respond_to?(:hide_plugin)

View File

@ -5,6 +5,7 @@
# version: 1.0 # version: 1.0
# authors: Vikhyat Korrapati (vikhyat), Régis Hanol (zogstrip) # authors: Vikhyat Korrapati (vikhyat), Régis Hanol (zogstrip)
# url: https://github.com/discourse/discourse/tree/main/plugins/poll # url: https://github.com/discourse/discourse/tree/main/plugins/poll
# transpile_js: true
register_asset "stylesheets/common/poll.scss" register_asset "stylesheets/common/poll.scss"
register_asset "stylesheets/desktop/poll.scss", :desktop register_asset "stylesheets/desktop/poll.scss", :desktop

View File

@ -4,6 +4,7 @@
# about: Preview how Widgets are Styled in Discourse # about: Preview how Widgets are Styled in Discourse
# version: 0.2 # version: 0.2
# author: Robin Ward # author: Robin Ward
# transpile_js: true
register_asset "stylesheets/styleguide.scss" register_asset "stylesheets/styleguide.scss"
enabled_site_setting :styleguide_enabled enabled_site_setting :styleguide_enabled