How to Automize YAML Lint in TYPO3?

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

How to Automize YAML Lint in TYPO3?

Are you looking to implement YAML lint in TYPO3? For better TYPO3 code quality, to save your productive time, it's always good practice to check TYPO3 Lint code, especially when working with a TYPO3 Template & Extension. Let's learn how! Always pass your TYPO3 YAML code with the below lint.

Step 1. Install and Configure YAML Lint

// Install Python-PIP
apt install python-pip

// Install Python based YAMLINT
pip install yamllint

Step 2. Prepare .yamllint.yml

extends: default

rules:
  braces:
    level: warning
    max-spaces-inside: 1
  brackets:
    level: warning
    max-spaces-inside: 1
  colons:
    level: warning
  commas:
    level: warning
  comments: disable
  comments-indentation: disable
  document-start: disable
  empty-lines:
    level: warning
  hyphens:
    level: warning
  indentation:
    spaces: 2
    level: warning
    indent-sequences: consistent
  line-length: disable
  truthy: disable

ignore: |
  /.ddev/

Step 3. Code Review Your YAML Code

// Run YAML Lint
yamllint -c .yamllint.yml .

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

×