From 2344557abc6915b2518922b9409615b988262c64 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Tue, 1 Dec 2020 23:12:34 +0100 Subject: [PATCH] [CLEANUP] Autoformat all files (#175) This will reduce unrelated autoformatting changes in other commits (and it also makes the code more readable). --- .github/workflows/ci.yml | 81 ++--- .gitlab/pipeline/.gitlab-ci.yml | 20 +- Configuration/TCA/Overrides/sys_template.php | 6 +- Configuration/TsLint.yml | 21 +- Resources/Private/.eslintrc.json | 16 +- Resources/Private/.prettierrc.js | 10 +- Resources/Private/Language/de.locallang.xlf | 66 ++-- .../Private/Language/de.locallang_db.xlf | 42 +-- Resources/Private/Language/locallang.xlf | 52 +-- Resources/Private/Language/locallang_db.xlf | 34 +- Resources/Private/Templates/Tea/Index.html | 8 +- Resources/Private/package.json | 50 +-- Resources/Private/stylelint.config.js | 320 +++++++++--------- codeception.yml | 5 +- composer.json | 244 ++++++------- ext_tables.sql | 6 +- 16 files changed, 477 insertions(+), 504 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b5bacb..f049c42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,29 +33,24 @@ jobs: name: "Code quality checks" runs-on: ubuntu-20.04 steps: - - - name: "Checkout" + - name: "Checkout" uses: actions/checkout@v2 - - - name: "Install PHP" + - name: "Install PHP" uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" tools: composer:v2 - name: "Show Composer version" run: composer --version - - - name: "Cache dependencies installed with composer" + - name: "Cache dependencies installed with composer" uses: actions/cache@v1 with: key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" path: ~/.composer/cache restore-keys: "php${{ matrix.php-version }}-composer-\n" - - - name: "Install Composer dependencies" + - name: "Install Composer dependencies" run: "composer install --no-progress" - - - name: "Run command" + - name: "Run command" run: "composer ci:${{ matrix.command }}" strategy: matrix: @@ -77,32 +72,25 @@ jobs: - "style" - "js" steps: - - - name: "Checkout" + - name: "Checkout" uses: actions/checkout@v2 - - - name: "Install modules" + - name: "Install modules" working-directory: ./Resources/Private run: yarn - - - name: "Run command" + - name: "Run command" working-directory: ./Resources/Private run: "yarn lint:${{ matrix.command }}" xliff-lint: name: "Xliff linter" runs-on: ubuntu-20.04 steps: - - - name: "Checkout" + - name: "Checkout" uses: actions/checkout@v2 - - - name: "Install xmllint" + - name: "Install xmllint" run: "sudo apt-get install libxml2-utils wget" - - - name: "Download xliff schema" + - name: "Download xliff schema" run: "wget https://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd" - - - name: "Run lint" + - name: "Run lint" run: "xmllint --schema ./xliff-core-1.2-strict.xsd --noout $(find Resources -name '*.xlf')" unit-tests: @@ -110,45 +98,38 @@ jobs: runs-on: ubuntu-20.04 needs: php-lint steps: - - - name: "Checkout" + - name: "Checkout" uses: actions/checkout@v2 - - - name: "Install PHP" + - name: "Install PHP" uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" tools: composer:v2 - name: "Show Composer version" run: composer --version - - - name: "Cache dependencies installed with composer" + - name: "Cache dependencies installed with composer" uses: actions/cache@v1 with: key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" path: ~/.composer/cache restore-keys: "php${{ matrix.php-version }}-composer-\n" - - - env: + - env: TYPO3: "${{ matrix.typo3-version }}" name: "Install TYPO3 Core" run: | composer require --no-progress typo3/minimal:"$TYPO3" composer show - - - if: "matrix.composer-dependencies == 'lowest'" + - if: "matrix.composer-dependencies == 'lowest'" name: "Install lowest dependencies with composer" run: | composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest composer show - - - if: "matrix.composer-dependencies == 'highest'" + - if: "matrix.composer-dependencies == 'highest'" name: "Install highest dependencies with composer" run: | composer update --no-ansi --no-interaction --no-progress --with-dependencies composer show - - - name: "Run unit tests" + - name: "Run unit tests" run: "composer ci:tests:unit" strategy: matrix: @@ -167,11 +148,9 @@ jobs: runs-on: ubuntu-18.04 needs: php-lint steps: - - - name: "Checkout" + - name: "Checkout" uses: actions/checkout@v2 - - - name: "Install PHP" + - name: "Install PHP" uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" @@ -179,37 +158,31 @@ jobs: extensions: mysqli - name: "Show Composer version" run: composer --version - - - name: "Cache dependencies installed with composer" + - name: "Cache dependencies installed with composer" uses: actions/cache@v1 with: key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" path: ~/.composer/cache restore-keys: "php${{ matrix.php-version }}-composer-\n" - - - env: + - env: TYPO3: "${{ matrix.typo3-version }}" name: "Install TYPO3 Core" run: | composer require --no-progress typo3/minimal:"$TYPO3" composer show - - - if: "matrix.composer-dependencies == 'lowest'" + - if: "matrix.composer-dependencies == 'lowest'" name: "Install lowest dependencies with composer" run: | composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest composer show - - - if: "matrix.composer-dependencies == 'highest'" + - if: "matrix.composer-dependencies == 'highest'" name: "Install highest dependencies with composer" run: | composer update --no-ansi --no-interaction --no-progress --with-dependencies composer show - - - name: "Start MySQL" + - name: "Start MySQL" run: "sudo /etc/init.d/mysql start" - - - name: "Run functional tests" + - name: "Run functional tests" run: | export typo3DatabaseName="typo3"; export typo3DatabaseHost="127.0.0.1"; diff --git a/.gitlab/pipeline/.gitlab-ci.yml b/.gitlab/pipeline/.gitlab-ci.yml index b0bfb29..9a0ce35 100644 --- a/.gitlab/pipeline/.gitlab-ci.yml +++ b/.gitlab/pipeline/.gitlab-ci.yml @@ -26,7 +26,7 @@ variables: build-composer-dependencies: extends: .default stage: build - needs: [] + needs: [ ] variables: COMPOSER_CACHE_DIR: '.composer' script: @@ -47,7 +47,7 @@ php-lint-php7.2: extends: .default image: php:7.2 stage: lint - needs: [] + needs: [ ] script: - composer ci:php:lint @@ -55,7 +55,7 @@ php-lint-php7.3: extends: .default image: php:7.3 stage: lint - needs: [] + needs: [ ] script: - composer ci:php:lint @@ -63,7 +63,7 @@ php-lint-php7.4: extends: .default image: php:7.4 stage: lint - needs: [] + needs: [ ] script: - composer ci:php:lint @@ -177,7 +177,7 @@ unit-php7.2-v9: extends: .default image: php:7.2 stage: test - dependencies: [] + dependencies: [ ] needs: - build-composer-dependencies - php-lint-php7.2 @@ -189,7 +189,7 @@ unit-php7.3-v9: extends: .default image: php:7.3 stage: test - dependencies: [] + dependencies: [ ] needs: - build-composer-dependencies - php-lint-php7.3 @@ -201,7 +201,7 @@ unit-php7.4-v9: extends: .default image: php:7.4 stage: test - dependencies: [] + dependencies: [ ] needs: - build-composer-dependencies - php-lint-php7.4 @@ -215,7 +215,7 @@ func-php7.2-v9: services: - mariadb:10 stage: test - dependencies: [] + dependencies: [ ] needs: - build-composer-dependencies - php-lint-php7.2 @@ -229,7 +229,7 @@ func-php7.3-v9: services: - mariadb:10 stage: test - dependencies: [] + dependencies: [ ] needs: - build-composer-dependencies - php-lint-php7.3 @@ -243,7 +243,7 @@ func-php7.4-v9: services: - mariadb:10 stage: test - dependencies: [] + dependencies: [ ] needs: - build-composer-dependencies - php-lint-php7.4 diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php index 1bb8d7b..13d32ae 100644 --- a/Configuration/TCA/Overrides/sys_template.php +++ b/Configuration/TCA/Overrides/sys_template.php @@ -3,4 +3,8 @@ defined('TYPO3_MODE') || die('Access denied.'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('tea', 'Configuration/TypoScript', 'Tea'); -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('tea', 'Configuration/TypoScript/Frontend/', 'Tea frontend (optional)'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( + 'tea', + 'Configuration/TypoScript/Frontend/', + 'Tea frontend (optional)' +); diff --git a/Configuration/TsLint.yml b/Configuration/TsLint.yml index c461dde..b110080 100644 --- a/Configuration/TsLint.yml +++ b/Configuration/TsLint.yml @@ -1,24 +1,17 @@ --- sniffs: - - - class: Indentation + - class: Indentation parameters: indentConditions: true indentPerLevel: 2 useSpaces: true - - - class: DeadCode - - - class: OperatorWhitespace - - - class: RepeatingRValue + - class: DeadCode + - class: OperatorWhitespace + - class: RepeatingRValue disabled: true - - - class: DuplicateAssignment - - - class: EmptySection + - class: DuplicateAssignment + - class: EmptySection disabled: true - - - class: NestingConsistency + - class: NestingConsistency parameters: commonPathPrefixThreshold: 1 diff --git a/Resources/Private/.eslintrc.json b/Resources/Private/.eslintrc.json index c81af52..a0adafa 100644 --- a/Resources/Private/.eslintrc.json +++ b/Resources/Private/.eslintrc.json @@ -1,10 +1,10 @@ { - "root": true, - "extends": [ - "eslint:recommended", - "plugin:prettier/recommended" - ], - "env": { - "browser": true - } + "root": true, + "extends": [ + "eslint:recommended", + "plugin:prettier/recommended" + ], + "env": { + "browser": true + } } diff --git a/Resources/Private/.prettierrc.js b/Resources/Private/.prettierrc.js index 20bf3f3..2c66e64 100644 --- a/Resources/Private/.prettierrc.js +++ b/Resources/Private/.prettierrc.js @@ -1,7 +1,7 @@ module.exports = { - semi: true, - trailingComma: "all", - singleQuote: true, - printWidth: 120, - tabWidth: 4 + semi: true, + trailingComma: "all", + singleQuote: true, + printWidth: 120, + tabWidth: 4 }; diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf index 370de29..cbe0ace 100644 --- a/Resources/Private/Language/de.locallang.xlf +++ b/Resources/Private/Language/de.locallang.xlf @@ -1,36 +1,36 @@ - -
- - - Tea - Tee - - - View - Ansicht - - - Tea list - Teeliste - - - Tea single view - Tee-Einzelansicht - - - Our selection of assorted teas - Unsere Auswahl an erlesenen Tees - - - UID - UID - - - Title - Titel - - - + +
+ + + Tea + Tee + + + View + Ansicht + + + Tea list + Teeliste + + + Tea single view + Tee-Einzelansicht + + + Our selection of assorted teas + Unsere Auswahl an erlesenen Tees + + + UID + UID + + + Title + Titel + + + diff --git a/Resources/Private/Language/de.locallang_db.xlf b/Resources/Private/Language/de.locallang_db.xlf index 7d7d231..765216f 100644 --- a/Resources/Private/Language/de.locallang_db.xlf +++ b/Resources/Private/Language/de.locallang_db.xlf @@ -1,24 +1,24 @@ - -
- - - Tea - Tee - - - Title - Titel - - - Description - Beschreibung - - - Image - Bild - - - + +
+ + + Tea + Tee + + + Title + Titel + + + Description + Beschreibung + + + Image + Bild + + + diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index 534246b..19852ed 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -1,29 +1,29 @@ - -
- - - Tea - - - View - - - Tea list - - - Tea single view - - - Our selection of assorted teas - - - UID - - - Title - - - + +
+ + + Tea + + + View + + + Tea list + + + Tea single view + + + Our selection of assorted teas + + + UID + + + Title + + + diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index 4ab0c12..e593780 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -1,20 +1,20 @@ - -
- - - Tea - - - Title - - - Description - - - Image - - - + +
+ + + Tea + + + Title + + + Description + + + Image + + + diff --git a/Resources/Private/Templates/Tea/Index.html b/Resources/Private/Templates/Tea/Index.html index f23f4b2..91dccc5 100644 --- a/Resources/Private/Templates/Tea/Index.html +++ b/Resources/Private/Templates/Tea/Index.html @@ -10,8 +10,12 @@ - - + + diff --git a/Resources/Private/package.json b/Resources/Private/package.json index 2d30199..bcab59d 100644 --- a/Resources/Private/package.json +++ b/Resources/Private/package.json @@ -1,27 +1,27 @@ { - "name": "tea", - "description": "", - "repository": { - "url": "https://github.com/TYPO3-Documentation/tea.git" - }, - "keywords": [], - "author": "", - "version": "1.0.0", - "license": "ISC", - "scripts": { - "lint:js": "eslint --config .eslintrc.json '../Public/**/*.js'", - "lint:js:fix": "eslint --config .eslintrc.json '../Public/**/*.js' --quiet --fix", - "lint:style": "stylelint --config stylelint.config.js ../Public/**/*.css", - "lint:style:fix": "stylelint --config stylelint.config.js ../Public/**/*.css --fix" - }, - "devDependencies": { - "eslint": "^6.8.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-import": "^2.20.1", - "eslint-plugin-prettier": "^3.1.4", - "prettier": "^2.0.5", - "stylelint": "^13", - "stylelint-config-recommended": "^3.0.0", - "stylelint-no-browser-hacks": "^1.2.1" - } + "name": "tea", + "description": "", + "repository": { + "url": "https://github.com/TYPO3-Documentation/tea.git" + }, + "keywords": [], + "author": "", + "version": "1.0.0", + "license": "ISC", + "scripts": { + "lint:js": "eslint --config .eslintrc.json '../Public/**/*.js'", + "lint:js:fix": "eslint --config .eslintrc.json '../Public/**/*.js' --quiet --fix", + "lint:style": "stylelint --config stylelint.config.js ../Public/**/*.css", + "lint:style:fix": "stylelint --config stylelint.config.js ../Public/**/*.css --fix" + }, + "devDependencies": { + "eslint": "^6.8.0", + "eslint-config-prettier": "^6.11.0", + "eslint-plugin-import": "^2.20.1", + "eslint-plugin-prettier": "^3.1.4", + "prettier": "^2.0.5", + "stylelint": "^13", + "stylelint-config-recommended": "^3.0.0", + "stylelint-no-browser-hacks": "^1.2.1" + } } diff --git a/Resources/Private/stylelint.config.js b/Resources/Private/stylelint.config.js index bf099b3..3ab3d44 100644 --- a/Resources/Private/stylelint.config.js +++ b/Resources/Private/stylelint.config.js @@ -1,169 +1,169 @@ "use strict"; module.exports = { - extends: "stylelint-config-recommended", - rules: { - "at-rule-empty-line-before": [ - "always", - { - "except": [ - "blockless-after-same-name-blockless", - "first-nested" - ], - "ignore": [ - "after-comment" - ] - } + extends: "stylelint-config-recommended", + rules: { + "at-rule-empty-line-before": [ + "always", + { + "except": [ + "blockless-after-same-name-blockless", + "first-nested" ], - "at-rule-name-case": "lower", - "at-rule-name-space-after": "always-single-line", - "at-rule-semicolon-newline-after": "always", - "block-closing-brace-empty-line-before": "never", - "block-closing-brace-newline-after": "always", - "block-closing-brace-newline-before": "always-multi-line", - "block-closing-brace-space-before": "always-single-line", - "block-no-empty": true, - "block-opening-brace-newline-after": "always-multi-line", - "block-opening-brace-space-after": "always-single-line", - "block-opening-brace-space-before": "always", - "color-hex-case": "lower", - "color-hex-length": "short", - "color-no-invalid-hex": true, - "comment-empty-line-before": [ - "always", - { - "except": [ - "first-nested" - ], - "ignore": [ - "stylelint-commands" - ] - } + "ignore": [ + "after-comment" + ] + } + ], + "at-rule-name-case": "lower", + "at-rule-name-space-after": "always-single-line", + "at-rule-semicolon-newline-after": "always", + "block-closing-brace-empty-line-before": "never", + "block-closing-brace-newline-after": "always", + "block-closing-brace-newline-before": "always-multi-line", + "block-closing-brace-space-before": "always-single-line", + "block-no-empty": true, + "block-opening-brace-newline-after": "always-multi-line", + "block-opening-brace-space-after": "always-single-line", + "block-opening-brace-space-before": "always", + "color-hex-case": "lower", + "color-hex-length": "short", + "color-no-invalid-hex": true, + "comment-empty-line-before": [ + "always", + { + "except": [ + "first-nested" ], - "comment-no-empty": true, - "comment-whitespace-inside": "always", - "custom-property-empty-line-before": [ - "always", - { - "except": [ - "after-custom-property", - "first-nested" - ], - "ignore": [ - "after-comment", - "inside-single-line-block" - ] - } + "ignore": [ + "stylelint-commands" + ] + } + ], + "comment-no-empty": true, + "comment-whitespace-inside": "always", + "custom-property-empty-line-before": [ + "always", + { + "except": [ + "after-custom-property", + "first-nested" ], - "declaration-bang-space-after": "never", - "declaration-bang-space-before": "always", - "declaration-block-no-duplicate-properties": [ - true, - { - "ignore": [ - "consecutive-duplicates-with-different-values" - ] - } + "ignore": [ + "after-comment", + "inside-single-line-block" + ] + } + ], + "declaration-bang-space-after": "never", + "declaration-bang-space-before": "always", + "declaration-block-no-duplicate-properties": [ + true, + { + "ignore": [ + "consecutive-duplicates-with-different-values" + ] + } + ], + "declaration-block-no-redundant-longhand-properties": true, + "declaration-block-no-shorthand-property-overrides": true, + "declaration-block-semicolon-newline-after": "always-multi-line", + "declaration-block-semicolon-space-after": "always-single-line", + "declaration-block-semicolon-space-before": "never", + "declaration-block-single-line-max-declarations": 1, + "declaration-block-trailing-semicolon": "always", + "declaration-colon-newline-after": "always-multi-line", + "declaration-colon-space-after": "always-single-line", + "declaration-colon-space-before": "never", + "declaration-empty-line-before": [ + "always", + { + "except": [ + "after-declaration", + "first-nested" ], - "declaration-block-no-redundant-longhand-properties": true, - "declaration-block-no-shorthand-property-overrides": true, - "declaration-block-semicolon-newline-after": "always-multi-line", - "declaration-block-semicolon-space-after": "always-single-line", - "declaration-block-semicolon-space-before": "never", - "declaration-block-single-line-max-declarations": 1, - "declaration-block-trailing-semicolon": "always", - "declaration-colon-newline-after": "always-multi-line", - "declaration-colon-space-after": "always-single-line", - "declaration-colon-space-before": "never", - "declaration-empty-line-before": [ - "always", - { - "except": [ - "after-declaration", - "first-nested" - ], - "ignore": [ - "after-comment", - "inside-single-line-block" - ] - } + "ignore": [ + "after-comment", + "inside-single-line-block" + ] + } + ], + "font-family-no-duplicate-names": true, + "function-calc-no-unspaced-operator": true, + "function-comma-newline-after": "always-multi-line", + "function-comma-space-after": "always-single-line", + "function-comma-space-before": "never", + "function-linear-gradient-no-nonstandard-direction": true, + "function-max-empty-lines": 0, + "function-name-case": "lower", + "function-parentheses-newline-inside": "always-multi-line", + "function-parentheses-space-inside": "never-single-line", + "function-whitespace-after": "always", + "indentation": 4, + "keyframe-declaration-no-important": true, + "length-zero-no-unit": true, + "max-empty-lines": 1, + "media-feature-colon-space-after": "always", + "media-feature-colon-space-before": "never", + "media-feature-name-case": "lower", + "media-feature-name-no-unknown": true, + "media-feature-parentheses-space-inside": "never", + "media-feature-range-operator-space-after": "always", + "media-feature-range-operator-space-before": "always", + "media-query-list-comma-newline-after": "always-multi-line", + "media-query-list-comma-space-after": "always-single-line", + "media-query-list-comma-space-before": "never", + "no-empty-source": true, + "no-eol-whitespace": true, + "no-extra-semicolons": true, + "no-invalid-double-slash-comments": true, + "no-missing-end-of-source-newline": true, + "number-leading-zero": "always", + "number-no-trailing-zeros": true, + "property-case": "lower", + "property-no-unknown": [ + true, + { + "ignoreProperties": [ + "/^scroll-padding/" + ] + } + ], + "rule-empty-line-before": [ + "always-multi-line", + { + "except": [ + "first-nested" ], - "font-family-no-duplicate-names": true, - "function-calc-no-unspaced-operator": true, - "function-comma-newline-after": "always-multi-line", - "function-comma-space-after": "always-single-line", - "function-comma-space-before": "never", - "function-linear-gradient-no-nonstandard-direction": true, - "function-max-empty-lines": 0, - "function-name-case": "lower", - "function-parentheses-newline-inside": "always-multi-line", - "function-parentheses-space-inside": "never-single-line", - "function-whitespace-after": "always", - "indentation": 4, - "keyframe-declaration-no-important": true, - "length-zero-no-unit": true, - "max-empty-lines": 1, - "media-feature-colon-space-after": "always", - "media-feature-colon-space-before": "never", - "media-feature-name-case": "lower", - "media-feature-name-no-unknown": true, - "media-feature-parentheses-space-inside": "never", - "media-feature-range-operator-space-after": "always", - "media-feature-range-operator-space-before": "always", - "media-query-list-comma-newline-after": "always-multi-line", - "media-query-list-comma-space-after": "always-single-line", - "media-query-list-comma-space-before": "never", - "no-empty-source": true, - "no-eol-whitespace": true, - "no-extra-semicolons": true, - "no-invalid-double-slash-comments": true, - "no-missing-end-of-source-newline": true, - "number-leading-zero": "always", - "number-no-trailing-zeros": true, - "property-case": "lower", - "property-no-unknown": [ - true, - { - "ignoreProperties": [ - "/^scroll-padding/" - ] - } - ], - "rule-empty-line-before": [ - "always-multi-line", - { - "except": [ - "first-nested" - ], - "ignore": [ - "after-comment" - ] - } - ], - "selector-attribute-brackets-space-inside": "never", - "selector-attribute-operator-space-after": "never", - "selector-attribute-operator-space-before": "never", - "selector-combinator-space-after": "always", - "selector-combinator-space-before": "always", - "selector-descendant-combinator-no-non-space": true, - "selector-list-comma-newline-after": "always", - "selector-list-comma-space-before": "never", - "selector-max-empty-lines": 0, - "selector-pseudo-class-case": "lower", - "selector-pseudo-class-no-unknown": true, - "selector-pseudo-class-parentheses-space-inside": "never", - "selector-pseudo-element-case": "lower", - "selector-pseudo-element-colon-notation": "single", - "selector-pseudo-element-no-unknown": true, - "selector-type-case": "lower", - "selector-type-no-unknown": true, - "shorthand-property-no-redundant-values": true, - "string-no-newline": true, - "unit-case": "lower", - "unit-no-unknown": true, - "value-list-comma-newline-after": "always-multi-line", - "value-list-comma-space-after": "always-single-line", - "value-list-comma-space-before": "never", - "value-list-max-empty-lines": 0, - }, + "ignore": [ + "after-comment" + ] + } + ], + "selector-attribute-brackets-space-inside": "never", + "selector-attribute-operator-space-after": "never", + "selector-attribute-operator-space-before": "never", + "selector-combinator-space-after": "always", + "selector-combinator-space-before": "always", + "selector-descendant-combinator-no-non-space": true, + "selector-list-comma-newline-after": "always", + "selector-list-comma-space-before": "never", + "selector-max-empty-lines": 0, + "selector-pseudo-class-case": "lower", + "selector-pseudo-class-no-unknown": true, + "selector-pseudo-class-parentheses-space-inside": "never", + "selector-pseudo-element-case": "lower", + "selector-pseudo-element-colon-notation": "single", + "selector-pseudo-element-no-unknown": true, + "selector-type-case": "lower", + "selector-type-no-unknown": true, + "shorthand-property-no-redundant-values": true, + "string-no-newline": true, + "unit-case": "lower", + "unit-no-unknown": true, + "value-list-comma-newline-after": "always-multi-line", + "value-list-comma-space-after": "always-single-line", + "value-list-comma-space-before": "never", + "value-list-max-empty-lines": 0, + }, }; diff --git a/codeception.yml b/codeception.yml index 5cd9095..2541021 100644 --- a/codeception.yml +++ b/codeception.yml @@ -4,8 +4,7 @@ suites: actor: AcceptanceTester modules: enabled: - - - WebDriver: + - WebDriver: browser: chrome url: "https://www.oliverklee.de" - \Helper\Acceptance @@ -13,7 +12,7 @@ suites: extensions: enabled: - Codeception\Extension\RunFailed -gherkin: [] +gherkin: [ ] modules: config: WebDriver: diff --git a/composer.json b/composer.json index 619850b..5c1c5ca 100644 --- a/composer.json +++ b/composer.json @@ -1,124 +1,124 @@ { - "name": "ttn/tea", - "description": "TYPO3 example extension for unit testing and best practices", - "type": "typo3-cms-extension", - "keywords": [ - "typo3", - "example", - "extension", - "tdd", - "phpunit", - "unit testing", - "best practices" - ], - "license": "GPL-2.0-or-later", - "authors": [ - { - "name": "Oliver Klee", - "email": "typo3-coding@oliverklee.de", - "homepage": "https://www.oliverklee.de", - "role": "developer" - } - ], - "support": { - "issues": "https://github.com/typo3-trainer-network/tea/issues", - "source": "https://github.com/typo3-trainer-network/tea" - }, - "require": { - "php": "~7.2.0 || ~7.3.0 || ~7.4.0", - "typo3/cms-core": "^9.5 || ^10.4", - "typo3/cms-extbase": "^9.5 || ^10.4", - "typo3/cms-fluid": "^9.5 || ^10.4", - "typo3/cms-frontend": "^9.5 || ^10.4" - }, - "require-dev": { - "codeception/codeception": "^4.1.5", - "friendsofphp/php-cs-fixer": "^2.16.3", - "helhum/typo3-composer-setup": "^0.5.7", - "helmich/typo3-typoscript-lint": "^2.1.1", - "nimut/testing-framework": "^5.0.3", - "phpunit/phpunit": "^7.5.20", - "squizlabs/php_codesniffer": "^3.5.5", - "typo3/cms-fluid-styled-content": "^9.5 || ^10.4", - "seld/jsonlint": "^1.8", - "phpdocumentor/reflection-docblock": "<= 5.1 || > 5.2", - "j13k/yaml-lint": "1.1.x-dev", - "sebastian/phpcpd": "^4.1.0" - }, - "conflict": { - "typo3/class-alias-loader": "< 1.1.0" - }, - "replace": { - "typo3-ter/tea": "self.version" - }, - "autoload": { - "psr-4": { - "TTN\\Tea\\": "Classes/" - } - }, - "autoload-dev": { - "psr-4": { - "TTN\\Tea\\Tests\\": "Tests/" - } - }, - "prefer-stable": true, - "config": { - "preferred-install": { - "*": "dist" - }, - "sort-packages": true, - "vendor-dir": ".Build/vendor" - }, - "scripts": { - "ci:php:lint": "find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l", - "ci:php:codestyle": "php-cs-fixer fix --config .php_cs.php -v --dry-run --using-cache false --diff --diff-format=udiff", - "ci:php:sniff": ".Build/vendor/bin/phpcs Classes Configuration Tests", - "ci:php:copypaste": ".Build/vendor/bin/phpcpd Classes Configuration Tests", - "ci:json:lint": "find . ! -path '*.Build/*' -name '*.json' | xargs .Build/vendor/bin/jsonlint -q", - "ci:yaml:lint": "find . ! -path '*.Build/*' -name '*.yml' | xargs .Build/vendor/bin/yaml-lint", - "ci:ts:lint": ".Build/vendor/bin/typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript", - "ci:tests:unit": ".Build/vendor/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/UnitTests.xml Tests/Unit", - "ci:tests:functional": "find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \"Running functional test suite {}\"; .Build/vendor/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml {}';", - "ci:tests": [ - "@ci:tests:unit", - "@ci:tests:functional" - ], - "ci:dynamic": [ - "@ci:tests" - ], - "ci:php": [ - "@ci:php:codestyle", - "@ci:php:sniff" - ], - "ci:static": [ - "@ci:php:lint", - "@ci:php:sniff", - "@ci:ts:lint" - ], - "ci": [ - "@ci:static" - ], - "link-extension": [ - "@php -r 'is_dir($extFolder=__DIR__.\"/.Build/public/typo3conf/ext/\") || mkdir($extFolder, 0777, true);'", - "@php -r 'file_exists($extFolder=__DIR__.\"/.Build/public/typo3conf/ext/tea\") || symlink(__DIR__,$extFolder);'" - ], - "fix:php:cs": "php-cs-fixer fix --config .php_cs.php", - "fix:php:sniff": ".Build/vendor/bin/phpcs Classes Configuration Tests", - "fix:php": [ - "@fix:php:cs", - "@fix:php:sniff" - ], - "post-autoload-dump": [ - "@link-extension" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "2.0.x-dev" - }, - "typo3/cms": { - "extension-key": "tea", - "web-dir": ".Build/public" - } - } + "name": "ttn/tea", + "description": "TYPO3 example extension for unit testing and best practices", + "type": "typo3-cms-extension", + "keywords": [ + "typo3", + "example", + "extension", + "tdd", + "phpunit", + "unit testing", + "best practices" + ], + "license": "GPL-2.0-or-later", + "authors": [ + { + "name": "Oliver Klee", + "email": "typo3-coding@oliverklee.de", + "homepage": "https://www.oliverklee.de", + "role": "developer" + } + ], + "support": { + "issues": "https://github.com/typo3-trainer-network/tea/issues", + "source": "https://github.com/typo3-trainer-network/tea" + }, + "require": { + "php": "~7.2.0 || ~7.3.0 || ~7.4.0", + "typo3/cms-core": "^9.5 || ^10.4", + "typo3/cms-extbase": "^9.5 || ^10.4", + "typo3/cms-fluid": "^9.5 || ^10.4", + "typo3/cms-frontend": "^9.5 || ^10.4" + }, + "require-dev": { + "codeception/codeception": "^4.1.5", + "friendsofphp/php-cs-fixer": "^2.16.3", + "helhum/typo3-composer-setup": "^0.5.7", + "helmich/typo3-typoscript-lint": "^2.1.1", + "nimut/testing-framework": "^5.0.3", + "phpunit/phpunit": "^7.5.20", + "squizlabs/php_codesniffer": "^3.5.5", + "typo3/cms-fluid-styled-content": "^9.5 || ^10.4", + "seld/jsonlint": "^1.8", + "phpdocumentor/reflection-docblock": "<= 5.1 || > 5.2", + "j13k/yaml-lint": "1.1.x-dev", + "sebastian/phpcpd": "^4.1.0" + }, + "conflict": { + "typo3/class-alias-loader": "< 1.1.0" + }, + "replace": { + "typo3-ter/tea": "self.version" + }, + "autoload": { + "psr-4": { + "TTN\\Tea\\": "Classes/" + } + }, + "autoload-dev": { + "psr-4": { + "TTN\\Tea\\Tests\\": "Tests/" + } + }, + "prefer-stable": true, + "config": { + "preferred-install": { + "*": "dist" + }, + "sort-packages": true, + "vendor-dir": ".Build/vendor" + }, + "scripts": { + "ci:php:lint": "find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l", + "ci:php:codestyle": "php-cs-fixer fix --config .php_cs.php -v --dry-run --using-cache false --diff --diff-format=udiff", + "ci:php:sniff": ".Build/vendor/bin/phpcs Classes Configuration Tests", + "ci:php:copypaste": ".Build/vendor/bin/phpcpd Classes Configuration Tests", + "ci:json:lint": "find . ! -path '*.Build/*' -name '*.json' | xargs .Build/vendor/bin/jsonlint -q", + "ci:yaml:lint": "find . ! -path '*.Build/*' -name '*.yml' | xargs .Build/vendor/bin/yaml-lint", + "ci:ts:lint": ".Build/vendor/bin/typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript", + "ci:tests:unit": ".Build/vendor/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/UnitTests.xml Tests/Unit", + "ci:tests:functional": "find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \"Running functional test suite {}\"; .Build/vendor/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml {}';", + "ci:tests": [ + "@ci:tests:unit", + "@ci:tests:functional" + ], + "ci:dynamic": [ + "@ci:tests" + ], + "ci:php": [ + "@ci:php:codestyle", + "@ci:php:sniff" + ], + "ci:static": [ + "@ci:php:lint", + "@ci:php:sniff", + "@ci:ts:lint" + ], + "ci": [ + "@ci:static" + ], + "link-extension": [ + "@php -r 'is_dir($extFolder=__DIR__.\"/.Build/public/typo3conf/ext/\") || mkdir($extFolder, 0777, true);'", + "@php -r 'file_exists($extFolder=__DIR__.\"/.Build/public/typo3conf/ext/tea\") || symlink(__DIR__,$extFolder);'" + ], + "fix:php:cs": "php-cs-fixer fix --config .php_cs.php", + "fix:php:sniff": ".Build/vendor/bin/phpcs Classes Configuration Tests", + "fix:php": [ + "@fix:php:cs", + "@fix:php:sniff" + ], + "post-autoload-dump": [ + "@link-extension" + ] + }, + "extra": { + "branch-alias": { + "dev-main": "2.0.x-dev" + }, + "typo3/cms": { + "extension-key": "tea", + "web-dir": ".Build/public" + } + } } diff --git a/ext_tables.sql b/ext_tables.sql index 958d9db..37399eb 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -1,5 +1,5 @@ CREATE TABLE tx_tea_domain_model_product_tea ( - title varchar(255) DEFAULT '' NOT NULL, - description varchar(2000) DEFAULT '' NOT NULL, - image int(11) unsigned DEFAULT '0' NOT NULL + title varchar(255) DEFAULT '' NOT NULL, + description varchar(2000) DEFAULT '' NOT NULL, + image int(11) unsigned DEFAULT '0' NOT NULL );
+ + + +