diff --git a/extensions/bbcode/.editorconfig b/extensions/bbcode/.editorconfig index 5612a5e74..87694ddab 100644 --- a/extensions/bbcode/.editorconfig +++ b/extensions/bbcode/.editorconfig @@ -12,21 +12,8 @@ insert_final_newline = true indent_style = space indent_size = 2 -[*.js] -indent_style = space -indent_size = 2 - -[*.{css,less}] -indent_style = space -indent_size = 2 - -[*.html] -indent_style = space -indent_size = 2 - [*.{diff,md}] trim_trailing_whitespace = false [*.php] -indent_style = space indent_size = 4 diff --git a/extensions/bbcode/.eslintrc b/extensions/bbcode/.eslintrc index 9cebc759d..534b50e27 100644 --- a/extensions/bbcode/.eslintrc +++ b/extensions/bbcode/.eslintrc @@ -27,7 +27,12 @@ "$": true, "moment": true }, + "plugins": [ + "react" + ], "rules": { + "react/jsx-uses-vars": 1, + /** * Strict mode */ diff --git a/extensions/bbcode/.php_cs b/extensions/bbcode/.php_cs new file mode 100755 index 000000000..c55085293 --- /dev/null +++ b/extensions/bbcode/.php_cs @@ -0,0 +1,27 @@ + + +For the full copyright and license information, please view the LICENSE +file that was distributed with this source code. +EOF; + +Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header); + +$finder = Symfony\CS\Finder\DefaultFinder::create() + ->exclude('js') + ->exclude('less') + ->in(__DIR__); + +return Symfony\CS\Config\Config::create() + ->setUsingCache(true) + ->level(Symfony\CS\FixerInterface::PSR2_LEVEL) + ->fixers([ + 'short_array_syntax', + 'header_comment', + '-psr0' + ]) + ->finder($finder); diff --git a/extensions/bbcode/.travis.yml b/extensions/bbcode/.travis.yml new file mode 100644 index 000000000..692e09f86 --- /dev/null +++ b/extensions/bbcode/.travis.yml @@ -0,0 +1,23 @@ +language: php + +php: + - 5.5 + - 5.6 + +matrix: + allow_failures: + - php: hhvm + fast_finish: true + +before_script: + - curl -s http://getcomposer.org/installer | php + - php composer.phar install + +script: + - php composer.phar style + +notifications: + email: + on_failure: change + +sudo: false diff --git a/extensions/bbcode/composer.json b/extensions/bbcode/composer.json index c3ee4d721..95f9dc5b4 100644 --- a/extensions/bbcode/composer.json +++ b/extensions/bbcode/composer.json @@ -3,5 +3,8 @@ "psr-4": { "Flarum\\BBCode\\": "src/" } + }, + "scripts": { + "style": "phpcs --standard=PSR2 -np src" } }