Skip to content

Commit

Permalink
[TASK] Set up PHP-CS-Fixer config
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrodala committed Dec 15, 2023
1 parent 8ec1f43 commit 7e573d8
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 12 deletions.
60 changes: 48 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,24 +1,60 @@
root = true
charset = utf-8
# EditorConfig is awesome: http://EditorConfig.org

trim_trailing_whitespace = true
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true

[composer.json]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.less]
indent_style = space
# TS/JS-Files
[*.{ts,js}]
indent_size = 2

[*.php]
indent_style = space
# JSON-Files
[*.json]
indent_style = tab

# ReST-Files
[*.{rst,rst.txt}]
indent_size = 4
max_line_length = 80

[*.ts]
indent_style = space
# Markdown-Files
[*.md]
max_line_length = 80

# YAML-Files
[*.{yaml,yml}]
indent_size = 2

# NEON-Files
[*.neon]
indent_size = 2
indent_style = tab

# package.json
[package.json]
indent_size = 2

# TypoScript
[*.{typoscript,tsconfig}]
indent_size = 2

# XLF-Files
[*.xlf]
indent_style = tab

# SQL-Files
[*.sql]
indent_style = tab
indent_size = 2

# .htaccess
[{_.htaccess,.htaccess}]
indent_style = tab
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.github export-ignore
.gitignore export-ignore
.phpunit.result.cache export-ignore
.php-cs-fixer.* export-ignore
bower.json export-ignore
composer.lock export-ignore
docker-compose.yml export-ignore
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.php-cs-fixer.cache
/.phpunit.result.cache
/bower_components
/composer.lock
Expand Down
11 changes: 11 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

$config = \TYPO3\CodingStandards\CsFixerConfig::create();
$config->getFinder()
->in(__DIR__)
->exclude([
'var',
'web',
]);

return $config;

0 comments on commit 7e573d8

Please sign in to comment.