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 .

Would you prefer a Ready-made template(s) or a Custom one for TYPO3?

  • FreeTYPO3 security audit & report
  • 35+Team of TYPO3 developers
  • 13+ Published free & premium TYPO3 templates
  • 15+Years of TYPO3 experience
  • 3Package plans are available for the TYPO3 security
TYPO3 Security Gig
TYPO3 Security Gig

Post a Comment

×