You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pierrejeambrun (via GitHub)" <gi...@apache.org> on 2023/02/25 20:27:06 UTC

[GitHub] [airflow] pierrejeambrun opened a new pull request, #29768: Add prettier formatting for www

pierrejeambrun opened a new pull request, #29768:
URL: https://github.com/apache/airflow/pull/29768

   **Issue**:
   Formatting with eslint is too permissive. 2 different formatting style can be considered 'valid' for eslint but quite different in practice. Also formatting with eslint is not the most common so switching for prettier might be helpful. (most front-end dev have their IDE already working with prettier)
   
   **Solution**:
   This introduce an opinionated formatter to have better consistency in our front-end code base.
   
   - Integrate with our `eslint` config
   - Integrate with our `stylelint` config
   - Add the prettier formatting step to the pre-commit hook, and rename/clarify the hook id/description


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] pierrejeambrun commented on a diff in pull request #29768: Add prettier formatting for www

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #29768:
URL: https://github.com/apache/airflow/pull/29768#discussion_r1117976042


##########
airflow/www/.prettierrc:
##########
@@ -0,0 +1,10 @@
+{

Review Comment:
   This is necessary because prettier is otherwise using the default config in `.editorconfig` that will format with an indent size of 4 the json files.



##########
airflow/www/.prettierignore:
##########
@@ -0,0 +1,5 @@
+.mypy_cache/
+templates/**/*.html
+dist/
+*.md

Review Comment:
   Don't prettier format yaml and md. Those are handled by other dedicated pre-commit hook.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] jedcunningham commented on pull request #29768: Add prettier formatting for www

Posted by "jedcunningham (via GitHub)" <gi...@apache.org>.
jedcunningham commented on PR #29768:
URL: https://github.com/apache/airflow/pull/29768#issuecomment-1459114699

   (Kicking this to 2.6)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] pierrejeambrun commented on a diff in pull request #29768: Add prettier formatting for www

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #29768:
URL: https://github.com/apache/airflow/pull/29768#discussion_r1117976042


##########
airflow/www/.prettierrc:
##########
@@ -0,0 +1,10 @@
+{

Review Comment:
   This is necessary because prettier is otherwise using the default config in `.editorconfig` that will format with an indent size of 4 json files.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] bbovenzi merged pull request #29768: Add prettier formatting for www

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi merged PR #29768:
URL: https://github.com/apache/airflow/pull/29768


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org