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)
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() }}

View File

@ -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}

View File

@ -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"]

View File

@ -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)

View File

@ -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'

View File

@ -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)

View File

@ -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

View File

@ -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