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.

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

Looking for the Right TYPO3 Products for Your Project?

Explore professional products from T3Planet Shop, including TYPO3 templates, TYPO3 extensions, and AI-powered extensions for modern TYPO3 websites.

  • TYPO3 Templates for flexible and scalable websites
  • TYPO3 Extensions for added features and functionality
  • AI Extensions for content, search, accessibility, localization, and automation
  • Free & Premium products for different TYPO3 project needs
Explore T3Planet Shop
T3Planet Shop TYPO3 Products

Post a Comment

×