mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-10 00:36:13 +01:00
[FEATURE] Add TypoScript and lint it (#9)
This commit is contained in:
parent
d6ad3b80b1
commit
7fbde75e2b
6 changed files with 62 additions and 2 deletions
|
@ -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
16
Configuration/TsLint.yml
Normal 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
|
21
Configuration/TypoScript/constants.txt
Normal file
21
Configuration/TypoScript/constants.txt
Normal 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 {
|
||||
|
||||
}
|
||||
}
|
15
Configuration/TypoScript/setup.txt
Normal file
15
Configuration/TypoScript/setup.txt
Normal 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 {
|
||||
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue