Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Nobug : Adds eslint and husky for linting goodness (#4199)
Browse files Browse the repository at this point in the history
* Adds eslint and husky for linting goodness
  • Loading branch information
Schalk Neethling authored and stephaniehobson committed Apr 28, 2017
1 parent d456162 commit 80617f5
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .eslintignore
@@ -0,0 +1,8 @@
kuma/static/js/libs/*
kuma/static/js/prism-mdn/*
kuma/wiki/jinja2/wiki/ckeditor_config.js

!kuma/static/js/libs/mozilla.cookiehelper.js
!kuma/static/js/libs/mozilla.dnthelper.js
!kuma/static/js/libs/mozilla.trafficcop.js
!kuma/static/js/libs/tag-it.js
65 changes: 65 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,65 @@
module.exports = {
"env": {
"browser": true,
"jquery": true
},
"extends": "eslint:recommended",
"rules": {
"no-global-assign": 1,
"indent": [
1,
4
],
"linebreak-style": [
1,
"unix"
],
"camelcase": 1,
"indent": 1,
"no-cond-assign": 1,
"no-console": 1,
"no-empty": 1,
"no-extra-semi": 1,
"no-fallthrough": 1,
"no-redeclare": 1,
"no-undef": 1,
"no-unused-vars": 1,
"quotes": [
1,
"single"
],
"semi": [
1,
"always"
],
"curly": [
1,
"all"
],
"camelcase": [
1,
{
"properties": "always"
}
],
"eqeqeq": [
1,
"smart"
],
"one-var-declaration-per-line": [
1,
"always"
],
"new-cap": 1
},
"globals": {
"CKEDITOR": true,
"FontFaceObserver": true,
"ga": true,
"gettext": true,
"interpolate": true,
"mdn": true,
"Mozilla": true,
"waffle": true
}
};
8 changes: 7 additions & 1 deletion package.json
Expand Up @@ -12,10 +12,16 @@
"bugs": {
"url": "https://bugzilla.mozilla.org/"
},
"scripts": {
"lint": "./node_modules/.bin/eslint kuma/",
"precommit": "npm run lint"
},
"devDependencies": {
"eslint": "^3.19.0",
"gulp": "^3.9.1",
"gulp-sass": "^3.1.0",
"gulp-stylelint": "^3.9.0",
"gulp-watch": "^4.3.6"
"gulp-watch": "^4.3.6",
"husky": "^0.13.3"
}
}

0 comments on commit 80617f5

Please sign in to comment.