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

Port .eslintrc.json to .js to support comments.

parent 0f8e157c
No related merge requests found
{
"extends": "eslint:recommended",
"globals": {
module.export = {
extends: "eslint:recommended",
globals: {
"$": false,
"document": false,
"window": false
},
"rules": {
rules: {
// errors
"block-scoped-var": "error",
"func-names": "error",
"no-loop-func": "error",
......@@ -13,6 +14,7 @@
"no-shadow": "error",
"no-unused-expressions": "error",
// warnings
"dot-notation": "warn",
"eqeqeq": ["warn", "smart"],
"guard-for-in": "warn",
......@@ -21,6 +23,7 @@
"no-console": ["warn", { "allow": ["warn", "error"] }],
"no-unneeded-ternary": "warn",
// fixed automatically
"block-spacing": ["warn", "always"],
"comma-spacing": ["warn", { "before": false, "after": true }],
"indent": ["error", 2],
......@@ -30,4 +33,4 @@
"semi-spacing": ["warn", { "before": false, "after": true }],
"space-infix-ops": "warn"
}
}
};
......@@ -107,13 +107,13 @@
<!-- ESLint -->
<target name="eslint">
<exec command="eslint -c ${srcdir}/.eslintrc.json ${srcdir}/themes/bootstrap3/js/*.js" escape="false" checkreturn="true" passthru="true" />
<exec command="eslint -c ${srcdir}/.eslintrc.js ${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" />
<exec command="eslint -c ${srcdir}/.eslintrc.js ${srcdir}/themes/bootstrap3/js/*.js --fix" 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" />
<exec command="eslint -c ${srcdir}/.eslintrc.js ${srcdir}/themes/bootstrap3/js/*.js --format checkstyle -o ${builddir}/reports/eslint.xml" escape="false" />
</target>
<!-- PHP API Documentation -->
......
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