Skip to content
Snippets Groups Projects
  1. Aug 11, 2023
    • Saurabh Kumar's avatar
      Add pre-commit with black,prettier and djhtml (#3502) · 4ce14204
      Saurabh Kumar authored
      - Add black, djhtml, prettier
      - Add precommit
      
      
      This PR add configurations for black, djhtml and prettier.
      
      - black is used for formatting python files
      - djhtml for formatting html files. Use `{# fmt: off #}` and `{# fmt: on
      #}` where needed.
      - prettier for formatting of sass,css,yml and js files
      
      Note: prettier picks up some of it's config from `.editorconfig`, so
      it's updated appropriately
      
      Formating of mardown files, minified or vendored js files are ignored.
      
      Formatting used off-the-self rules for better consistency with the
      community as large.
      
      The formatting is not applied to all the files as it will introduce a
      lot of merge conflict with
      current PRs, instead `pre-commit` config is provide which can be
      installed by `precommit install`
      locally. It will format only the modified files in the PR/commits. 
      
      Once majority of the current active PRs are either rebased & formatted
      using precommit or merged, we can
      run the `make fmt` on the full repo and activate additional prettier and
      black checks in our lint rules.
      
      The modified sass files fixes the eslint error that would came up if we
      were to apply the prettier formatter on them.
      
      Fixes #3500
      Unverified
      4ce14204
  2. Jul 13, 2023
  3. Jun 15, 2023
  4. Apr 10, 2023
  5. Mar 20, 2023
  6. Feb 22, 2023
  7. Feb 20, 2023
  8. Feb 01, 2023
  9. Dec 07, 2022
  10. Apr 14, 2022
  11. Mar 16, 2022
  12. Mar 11, 2022
  13. Mar 08, 2022
  14. Feb 10, 2022
  15. Jan 31, 2022
  16. Jan 26, 2022
  17. Dec 07, 2021
  18. Sep 23, 2021
  19. Sep 15, 2021
  20. Jul 08, 2021
  21. Jul 07, 2021
  22. May 18, 2021
  23. Apr 30, 2021
  24. Mar 24, 2021
  25. Feb 16, 2021
  26. Feb 09, 2021
  27. Dec 03, 2020
  28. Nov 30, 2020
Loading