Skip to content
Snippets Groups Projects
  1. Sep 25, 2023
    • Benjamin Franzke's avatar
      [TASK] Migrate JavaScript unit test from karma to @web/test-runner · 432fb34e
      Benjamin Franzke authored
      Use @web/test-runner which is toolset by the modern-web.dev and
      open-wc.org initiatives. It is based on mocha and es-dev-server,
      which allows to run our JavaScript modules natively in the browser
      (without having to bundle them via rollup).
      
      Note that compiled test files have been removed from the
      source tree, since we configure es-dev-server to transpile
      them on demand, allowing error output from tests to be
      using original line numbers and unmangled identifiers.
      
      The tests are executed in chrome by default (locally and CI).
      They can be executed via:
      
        # Run once
        npm run test
      
        # Run tests whenever files change
        npm run watch:build
        npm run watch:test
      
        # Open browser with devtools and debug mode activated
        MODE=dev npm run watch:test -- --debug
      
      Configuration is prepared to run in multiple browsers via playwright.
      Example:
      
        # https://playwright.dev/docs/browsers#install-system-dependencies
        npx playwright install --with-deps
        B...
      432fb34e
  2. Sep 05, 2023
    • Benjamin Franzke's avatar
      [TASK] Allow eslint execution from root folder · 66b45be3
      Benjamin Franzke authored
      With #101782 eslint project configuration was overwritten
      to use a custom path.
      eslint read the relative project configuration based
      on the current execution folder instead of relative
      to the eslintrc file.
      This worked as long as eslint was executed from the
      Build/ folder (execution folder == eslintrc folder).
      
      As some tools execute eslint from the git root directory,
      the configuration is now adapted to always resolve the
      tsconfig file name as an absolute path based on the
      configurations directory name.
      
      Also overrideConfigFile is removed from Gruntfile.js
      as .eslintrc.[json|js] is read by default and no
      override is needed.
      
      Resolves: #101846
      Related: #101782
      Releases: main, 12.4
      Change-Id: I58a6322a74d388efb0da28d1d8e7375f491c7aea
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80841
      
      
      Reviewed-by: default avatarBenjamin Franzke <ben@bnf.dev>
      Tested-by: default avatarBenjamin Franzke <ben@bnf.dev>
      Tested-by: default avatarcore-ci <typo3@b13.com>
      66b45be3
  3. Mar 09, 2023
    • Benjamin Kott's avatar
      [TASK] Cleanup eslint configuration · 03e4a4a5
      Benjamin Kott authored
      We renamed the eslint configuration to follow the recommended standards
      so developers IDEs will pick up the configuration more easily.
      
      The ruleset was adapted to follow a wider range of recommendations.
      - eslint:recommended
      - @typescript-eslint/recommended
      - lit/recommended
      - wc/recommended
      
      In addition we now also force more kinds of spacing rules to avoid
      IDEs having different opinions on how to format for example includes.
      
      The only recommendation we don't want to follow is
      - @typescript-eslint/no-inferrable-types.
      We don't want to disallow being explicit.
      
      Instead of turning off rules we cannot fully fulfill as of now, we are
      now changing the configuration to warning. This will help developers
      spotting mistakes more easy when writing code.
      
      Rules that are currently in "warn" mode:
      - @typescript-eslint/ban-types
      - @typescript-eslint/no-explicit-any
      - @typescript-eslint/no-this-alias
      
      To only check for errors run in the Build directory:
      - npx eslint ./Sources/TypeScr...
      03e4a4a5
  4. Sep 06, 2022
  5. Apr 05, 2022
  6. Jul 29, 2021
  7. Dec 15, 2020
  8. Jan 07, 2020
  9. May 10, 2019
  10. Apr 23, 2019
  11. Jul 30, 2018
  12. May 11, 2018
  13. Nov 03, 2017
  14. Oct 30, 2017
  15. May 17, 2017
  16. Mar 28, 2017
  17. Mar 26, 2017
  18. Feb 01, 2017
  19. Nov 26, 2015
  20. Oct 08, 2015
  21. Apr 06, 2015
  22. Nov 24, 2014
  23. Nov 16, 2014
  24. Sep 16, 2014