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.

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

Post a Comment

×
Captcha Code Kann das Bild nicht gelesen werden? Klicken Sie hier, um zu aktualisieren

    Got answer to the question you were looking for?