DEV: Remove `.es6` extensions from core (#14912)
Still supported in plugins though.
This commit is contained in:
parent
cb3cb96149
commit
4ad77f3382
|
@ -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() }}
|
||||||
|
|
20
lefthook.yml
20
lefthook.yml
|
@ -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}
|
||||||
|
|
|
@ -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"]
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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'
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue