config: add 'prettier' command before bundeling process
Execute the 'prettier' command to check format code style. Change-Id: I93e4a57e03d26627caa3b2c52ae44669a8723267 Signed-off-by: Henry Castro <hcastro@collabora.com>
This commit is contained in:
parent
ec40680f9a
commit
76d33f1182
2 changed files with 11 additions and 0 deletions
|
@ -544,6 +544,11 @@ $(INTERMEDIATE_DIR)/admin-src.js: $(COOL_ADMIN_TS_JS) $(COOL_ADMIN_JS)
|
|||
@mkdir -p $(dir $@)
|
||||
@echo "Checking for admin JS errors..."
|
||||
@$(NODE) node_modules/eslint/bin/eslint.js --resolve-plugins-relative-to $(abs_builddir) --ignore-path $(srcdir)/.eslintignore --config .eslintrc --no-eslintrc --ignore-pattern $(COOL_ADMIN_TS_JS) $(srcdir)/admin/src
|
||||
@$(NODE) node_modules/.bin/prettier \
|
||||
--ignore-path $(srcdir)/browser/.prettierignore \
|
||||
--ignore-path $(srcdir)/browser/.beforeprettier \
|
||||
--debug-check \
|
||||
$(srcdir)/admin/src
|
||||
@awk 'FNR == 1 {print ""} 1' $(COOL_ADMIN_TS_JS) $(patsubst %.js,$(srcdir)/%.js,$(COOL_ADMIN_JS)) > $@
|
||||
|
||||
$(INTERMEDIATE_DIR)/cool-src.js: tscompile.done $(call prereq_cool) $(COOL_JS_DST) $(abs_top_srcdir)/scripts/unocommands.py
|
||||
|
@ -554,6 +559,11 @@ $(INTERMEDIATE_DIR)/cool-src.js: tscompile.done $(call prereq_cool) $(COOL_JS_DS
|
|||
@echo "Checking for cool JS errors..."
|
||||
@$(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/src --resolve-plugins-relative-to $(abs_builddir) \
|
||||
$(srcdir)/js --ignore-path $(srcdir)/.eslintignore --no-eslintrc --config .eslintrc
|
||||
@$(NODE) node_modules/.bin/prettier \
|
||||
--ignore-path $(srcdir)/browser/.prettierignore \
|
||||
--ignore-path $(srcdir)/browser/.beforeprettier \
|
||||
--debug-check \
|
||||
$(srcdir)/src
|
||||
@echo "Bundling cool..."
|
||||
$(call bundle_cool)
|
||||
|
||||
|
|
|
@ -1404,6 +1404,7 @@ AC_SUBST(ENABLE_SETCAP)
|
|||
AC_CONFIG_LINKS([discovery.xml:discovery.xml])
|
||||
AC_CONFIG_LINKS([browser/package.json:browser/package.json])
|
||||
AC_CONFIG_LINKS([browser/.eslintrc:browser/.eslintrc])
|
||||
AC_CONFIG_LINKS([browser/.prettierrc:browser/.prettierrc])
|
||||
AC_CONFIG_LINKS([cypress_test/package.json:cypress_test/package.json])
|
||||
AC_CONFIG_COMMANDS_PRE([
|
||||
if test "$srcdir" != '.'; then
|
||||
|
|
Loading…
Reference in a new issue