mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-09-19 23:56:13 +02:00

[FEATURE] Add TypoScript and lint it (#9)

This commit is contained in:
Oliver Klee 2018-01-27 17:44:42 +01:00 committed by GitHub
parent d6ad3b80b1
commit 7fbde75e2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 62 additions and 2 deletions

View file

@ -31,3 +31,8 @@ script:
echo;
echo "Linting all PHP files";
composer ci:php:lint;
- >
echo;
echo "Linting all TypoScript files";
composer ci:ts:lint;

16
Configuration/TsLint.yml Normal file
View file

@ -0,0 +1,16 @@
sniffs:
- class: Indentation
parameters:
useSpaces: true
indentPerLevel: 4
indentConditions: true
- class: DeadCode
- class: OperatorWhitespace
- class: RepeatingRValue
disabled: true
- class: DuplicateAssignment
- class: EmptySection
disabled: true
- class: NestingConsistency
parameters:
commonPathPrefixThreshold: 1

View file

@ -0,0 +1,21 @@
plugin.tx_tea {
view {
# cat=plugin.tx_tea/file; type=string; label=Path to template root (FE)
templateRootPath = EXT:tea/Resources/Private/Templates/
# cat=plugin.tx_tea/file; type=string; label=Path to template partials (FE)
partialRootPath = EXT:tea/Resources/Private/Partials/
# cat=plugin.tx_tea/file; type=string; label=Path to template layouts (FE)
layoutRootPath = EXT:tea/Resources/Private/Layouts/
}
persistence {
# cat=plugin.tx_tea//a; type=string; label=Default storage PID
storagePid =
# cat=plugin.tx_tea//a; type=int; label=UID of the page/folder where all new records will be created
newRecordStoragePid =
}
settings {
}
}

View file

@ -0,0 +1,15 @@
plugin.tx_tea {
view {
templateRootPath = {$plugin.tx_tea.view.templateRootPath}
partialRootPath = {$plugin.tx_tea.view.partialRootPath}
layoutRootPath = {$plugin.tx_tea.view.layoutRootPath}
}
persistence {
storagePid = {$plugin.tx_tea.persistence.storagePid}
}
settings {
}
}

View file

@ -32,8 +32,9 @@
"typo3/cms-frontend": "^7.6.23 || ^8.7.9"
},
"require-dev": {
"nimut/testing-framework": "^2.0.0",
"helhum/typo3-composer-setup": "^0.5.1",
"helmich/typo3-typoscript-lint": "^1.4.4",
"nimut/testing-framework": "^2.0.0",
"phpunit/phpunit": "^5.7.0",
"mikey179/vfsStream": "^1.6.0",
"roave/security-advisories": "dev-master"
@ -63,8 +64,10 @@
},
"scripts": {
"ci:php:lint": "find *.php Classes/ Configuration/ Tests/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l",
"ci:ts:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript/",
"ci:static": [
"@ci:php:lint"
"@ci:php:lint",
"@ci:ts:lint"
],
"ci": [
"@ci:static"