mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 04:34:32 +08:00
DEV: Remove .es6
extensions from core (#14912)
Still supported in plugins though.
This commit is contained in:
parent
cb3cb96149
commit
4ad77f3382
8
.github/workflows/linting.yml
vendored
8
.github/workflows/linting.yml
vendored
|
@ -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() }}
|
||||
|
|
20
lefthook.yml
20
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}
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user