Skip to content

Instantly share code, notes, and snippets.

@Starraider
Last active May 25, 2021 05:34
Show Gist options
  • Save Starraider/3fae6771252beaede02b9c49dabeccae to your computer and use it in GitHub Desktop.
Save Starraider/3fae6771252beaede02b9c49dabeccae to your computer and use it in GitHub Desktop.
Linting TYPO3 Extensions

Linting TYPO3 Extensions

General

TYPO3/coding-standards

Gives you PHP-CS-Fixer rules and .editorconfig for TYPO3 projects.

Installation

ddev composer req --dev typo3/coding-standards

Usage

Generating coding standards files .php_cs and .editorconfig

php vendor/typo3/coding-standards/setup.php project
php vendor/typo3/coding-standards/setup.php extension

GitHub

PHP

friendsofphp/php-cs-fixer

Installation

composer require friendsofphp/php-cs-fixer --dev

Usage

ddev exec php-cs-fixer fix -vv
ddev exec php-cs-fixer fix ./packages/myextension/

GitHub

JavaScript

CSS/SCSS

TypoScript

martin-helmich/typo3-typoscript-lint

Installation

composer require --dev helmich/typo3-typoscript-lint

Usage

vendor/bin/typoscript-lint path/to/your.typoscript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment