Skip to content

Commit 6a36dd3

Browse files
committed
Make php-cs-fixer config form TYPO3/coding-standards. Update .editorconfig from TYPO3/coding-standards.
1 parent e2b8494 commit 6a36dd3

File tree

6 files changed

+64
-118
lines changed

6 files changed

+64
-118
lines changed

.editorconfig

+53-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,60 @@
1-
root = false
1+
# EditorConfig is awesome: http://EditorConfig.org
22

3-
[{*.rst,*.rst.txt}]
4-
charset = utf-8
5-
end_of_line = lf
6-
insert_final_newline = true
7-
trim_trailing_whitespace = true
8-
indent_style = space
9-
indent_size = 3
3+
# top-most EditorConfig file
4+
root = true
105

11-
# MD-Files
12-
[*.md]
6+
# Unix-style newlines with a newline ending every file
7+
[*]
138
charset = utf-8
149
end_of_line = lf
10+
indent_style = space
11+
indent_size = 4
1512
insert_final_newline = true
1613
trim_trailing_whitespace = true
17-
indent_style = space
14+
15+
# TS/JS-Files
16+
[*.{ts,js}]
17+
indent_size = 2
18+
19+
# JSON-Files
20+
[*.json]
21+
indent_style = tab
22+
23+
# ReST-Files
24+
[*.{rst,rst.txt}]
1825
indent_size = 4
26+
max_line_length = 80
27+
28+
# Markdown-Files
29+
[*.md]
30+
max_line_length = 80
31+
32+
# YAML-Files
33+
[*.{yaml,yml}]
34+
indent_size = 2
35+
36+
# NEON-Files
37+
[*.neon]
38+
indent_size = 2
39+
indent_style = tab
40+
41+
# package.json
42+
[package.json]
43+
indent_size = 2
44+
45+
# TypoScript
46+
[*.{typoscript,tsconfig}]
47+
indent_size = 2
48+
49+
# XLF-Files
50+
[*.xlf]
51+
indent_style = tab
52+
53+
# SQL-Files
54+
[*.sql]
55+
indent_style = tab
56+
indent_size = 2
57+
58+
# .htaccess
59+
[{_.htaccess,.htaccess}]
60+
indent_style = tab

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ nbproject
2020
/.test
2121
/composer.lock
2222
/var
23-
/.php_cs.cache
23+
/.php-cs-fixer.cache

.php-cs-fixer.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
$config = \TYPO3\CodingStandards\CsFixerConfig::create();
4+
$config->getFinder()->in(__DIR__);
5+
return $config;

.php_cs

-90
This file was deleted.

.styleci.yml

-12
This file was deleted.

composer.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@
3232
"doctrine/annotations": "^1.0"
3333
},
3434
"require-dev": {
35-
"friendsofphp/php-cs-fixer": "^2.0",
36-
"nimut/testing-framework": "^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0"
35+
"friendsofphp/php-cs-fixer": "^3.0",
36+
"nimut/testing-framework": "^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0",
37+
"typo3/coding-standards": "^0.5.2"
3738
},
3839
"autoload": {
3940
"psr-4": {
@@ -67,8 +68,8 @@
6768
"composer run test-unit-v11",
6869
"composer run test-functional-v11"
6970
],
70-
"cs": "./.Build/bin/php-cs-fixer fix --dry-run --diff --config=./.php_cs -vvv",
71-
"csfix": "./.Build/bin/php-cs-fixer fix --config=./.php_cs -vvv",
71+
"cs": "./.Build/bin/php-cs-fixer fix --dry-run --diff -vvv",
72+
"csfix": "./.Build/bin/php-cs-fixer fix -vvv",
7273
"t3doc": "rm -rf ./Documentation-GENERATED-temp && docker-compose run --rm t3docmake && open \"Documentation-GENERATED-temp/Result/project/0.0.0/Index.html\"",
7374
"next-patch": "./Resources/Private/Php/nextVersion.php",
7475
"next-minor": "./Resources/Private/Php/nextVersion.php --version-type=minor",

0 commit comments

Comments
 (0)