How to Implement TypoScript Lint in TYPO3?

Are you looking to implement TypoScript lint in TYPO3? For better TYPO3 code quality, Always pass your TypoScript code with below lint.

Are you looking for How to Implement TypoScript Lint in TYPO3? For better TYPO3 code quality, always pass your TypoScript code with the below lint. Browse more TYPO3 extensions from T3Planet to extend your site further.

Step 1. Install and Configure TypoScript Lint

// Globally install TypoScript lint
composer global require helmich/typo3-typoscript-lint

// Project wise install TypoScript lint
composer require helmich/typo3-typoscript-lint

Step 2. Prepare .tslint.yaml

// Create .tslint.yaml at your root of project
paths:
  - Configuration

filePatterns:
  - "*.typoscript"

sniffs:
  - class: Indentation
    parameters:
      indentConditions: true
  - class: RepeatingRValue
    disabled: true
  - class: DeadCode
    disabled: true

Step 3. Code Review Your TypoScript Code

// Run TypoScript Lint
/home/nitsan/.composer/vendor/bin/typoscript-lint -c .tslint.yaml

You May Also Like