Skip to content
Snippets Groups Projects
Commit a84787b1 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Travis and Jenkins eslint configurations.

parent 5e7d82c3
No related merge requests found
......@@ -15,6 +15,7 @@ before_script:
- pear install phing/phing
- phpenv config-rm xdebug.ini
- phpenv rehash
- npm install -g eslint
script:
- phing composer phpunitfast phpcs-console php-cs-fixer-dryrun
- phing composer phpunitfast phpcs-console php-cs-fixer-dryrun eslint
......@@ -65,6 +65,7 @@
<phingcall target="phpmd"/>
<phingcall target="pdepend"/>
<phingcall target="phploc"/>
<phingcall target="eslint-report"/>
</target>
<!-- Report rule violations with PHPMD (mess detector) -->
......@@ -103,6 +104,17 @@
<exec command="${srcdir}/vendor/bin/php-cs-fixer fix ${srcdir}/module --fixers=${php-cs-fixers} --dry-run --verbose --diff" passthru="true" escape="false" checkreturn="true" />
</target>
<!-- ESLint -->
<target name="eslint">
<exec command="eslint -c ${srcdir}/.eslintrc.json ${srcdir}/themes/bootstrap3/js/*.js" escape="false" checkreturn="true" passthru="true" />
</target>
<target name="eslint-fix">
<exec command="eslint --fix -c ${srcdir}/.eslintrc.json ${srcdir}/themes/bootstrap3/js/*.js" escape="false" passthru="true" />
</target>
<target name="eslint-report">
<exec command="eslint -c ${srcdir}/.eslintrc.json ${srcdir}/themes/bootstrap3/js/*.js -f checkstyle -o ${builddir}/reports/eslint.xml" escape="false" />
</target>
<!-- PHP API Documentation -->
<target name="phpdoc">
<mkdir dir="${builddir}/apidocs"/>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment