Add .eslintrc

This commit is contained in:
William Boman 2015-10-01 00:15:19 +02:00
parent 1a68e96c87
commit a69992f6b2
3 changed files with 38 additions and 1 deletions

3
.eslintignore Normal file
View file

@ -0,0 +1,3 @@
client/js/libs.min.js
client/js/libs/**/*.js
client/js/shout.templates.js

32
.eslintrc Normal file
View file

@ -0,0 +1,32 @@
---
root: true
env:
browser: true
mocha: true
node: true
rules:
comma-dangle: 0
curly: [2, multi-line]
eqeqeq: 2
indent: [2, tab]
linebreak-style: [2, unix]
object-curly-spacing: [2, never]
semi: [2, always]
space-after-keywords: [2, always]
space-before-function-paren: [2, never]
spaced-comment: [2, always]
no-console: 0
no-trailing-spaces: 2
quotes: [2, double]
globals:
$: false
Favico: false
Handlebars: false
io: false
Mousetrap: false
extends: eslint:recommended

View file

@ -14,7 +14,8 @@
"scripts": {
"start": "node index",
"build": "grunt",
"test": "HOME=test/fixtures mocha test/**/*.js"
"test": "HOME=test/fixtures mocha test/**/*.js",
"lint": "eslint index.js Gruntfile.js src/ test/ client/ defaults/"
},
"keywords": [
"browser",
@ -40,6 +41,7 @@
"socket.io": "~1.0.6"
},
"devDependencies": {
"eslint": "^1.5.1",
"grunt": "~0.4.5",
"grunt-contrib-uglify": "~0.5.0",
"grunt-contrib-watch": "^0.6.1",