Skip to content

Commit

Permalink
Update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
inukshuk committed Feb 25, 2016
1 parent 0686fff commit f8ea562
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 135 deletions.
189 changes: 56 additions & 133 deletions .eslintrc
@@ -1,136 +1,59 @@
// vi: set ft=javascript :
{
"ecmaFeatures": {
"blockBindings": true,
"generators": true
},
# vi: set ft=yaml

"env": {
"node": true,
"mocha": true
},
root: true

"rules": {
"no-alert": 0,
"no-array-constructor": 2,
"no-bitwise": 0,
"no-caller": 2,
"no-catch-shadow": 2,
"no-comma-dangle": 2,
"no-cond-assign": 2,
"no-console": 0,
"no-constant-condition": 2,
"no-control-regex": 2,
"no-debugger": 1,
"no-delete-var": 2,
"no-div-regex": 0,
"no-dupe-keys": 2,
"no-else-return": 0,
"no-empty": 2,
"no-empty-class": 2,
"no-empty-label": 2,
"no-eq-null": 0,
"no-eval": 2,
"no-ex-assign": 2,
"no-extend-native": 2,
"no-extra-boolean-cast": 2,
"no-extra-parens": 0,
"no-extra-semi": 2,
"no-extra-strict": 2,
"no-fallthrough": 2,
"no-floating-decimal": 0,
"no-func-assign": 2,
"no-implied-eval": 2,
"no-inner-declarations": [2, "functions"],
"no-invalid-regexp": 2,
"no-iterator": 2,
"no-label-var": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-lonely-if": 0,
"no-loop-func": 2,
"no-mixed-requires": [0, false],
"no-multi-str": 2,
"no-multi-spaces": 0,
"no-native-reassign": 2,
"no-negated-in-lhs": 2,
"no-nested-ternary": 0,
"no-new": 0,
"no-new-func": 2,
"no-new-object": 2,
"no-new-require": 0,
"no-new-wrappers": 2,
"no-obj-calls": 2,
"no-octal": 2,
"no-octal-escape": 2,
"no-path-concat": 0,
"no-plusplus": 0,
"no-process-exit": 0,
"no-proto": 2,
"no-redeclare": 2,
"no-regex-spaces": 2,
"no-restricted-modules": 0,
"no-return-assign": 2,
"no-script-url": 2,
"no-self-compare": 0,
"no-sequences": 2,
"no-shadow": 2,
"no-shadow-restricted-names": 2,
"no-spaced-func": 2,
"no-space-before-semi": 2,
"no-sparse-arrays": 2,
"no-sync": 0,
"no-ternary": 0,
"no-undef": 2,
"no-undef-init": 2,
"no-underscore-dangle": 0,
"no-unreachable": 2,
"no-unused-expressions": 0,
"no-unused-vars": [2, {"vars": "local", "args": "none"}],
"no-use-before-define": [2, "nofunc"],
"no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }],
"no-with": 2,
"no-wrap-func": 2,
extends:
'eslint:recommended'
env:
node: true
browser: false
parserOptions:
ecmaVersion: 6
ecmaFeatures:
generators: true

"block-scoped-var": 0,
"brace-style": [0, "1tbs"],
"camelcase": 0,
"complexity": [0, 11],
"consistent-return": 2,
"consistent-this": [0, "that"],
"curly": [0, "multi"],
"default-case": 0,
"dot-notation": 2,
"eqeqeq": 2,
"func-names": 0,
"func-style": [0, "declaration"],
"guard-for-in": 0,
"key-spacing": 0,
"max-depth": [1, 4],
"max-len": [1, 80, 2],
"max-nested-callbacks": [0, 2],
"max-params": [0, 3],
"max-statements": [0, 10],
"handle-callback-err": 0,
"new-cap": 2,
"new-parens": 2,
"one-var": 0,
"quote-props": 0,
"quotes": [2, "single", "avoid-escape"],
"radix": 0,
"semi": 2,
"sort-vars": 0,
"space-after-keywords": [0, "always"],
"space-in-brackets": [0, "never"],
"space-infix-ops": 2,
"space-return-throw-case": 2,
"space-unary-word-ops": 0,
"strict": 0,
"global-strict": [2, "always"],
"use-isnan": 2,
"valid-jsdoc": 0,
"valid-typeof": 2,
"wrap-iife": 0,
"wrap-regex": 0
}
}
rules:
array-bracket-spacing: 2
block-spacing: 2
brace-style: [2, '1tbs', { allowSingleLine: true }]
comma-style: 2
comma-spacing: 2
complexity: [1, 10]
consistent-return: 0
consistent-this: [2, 'self']
curly: 0
dot-location: [2, 'property']
eqeqeq: [2, 'smart']
indent: [2, 2, { SwitchCase: 1 }]
key-spacing: [1, { beforeColon: false, afterColon: true }]
keyword-spacing: 2
max-depth: [1, 6]
max-len: [1, 80, 2, { ignoreComments: true, ignoreUrls: true }]
max-nested-callbacks: [1, 4]
new-parens: 2
no-caller: 2
no-eval: 2
no-implied-eval: 2
no-loop-func: 2
no-mixed-spaces-and-tabs: 2
no-multi-str: 2
no-shadow: 2
no-spaced-func: 2
no-trailing-spaces: 2
no-unexpected-multiline: 2
no-unneeded-ternary: 2
no-useless-concat: 2
no-unreachable: 2
object-curly-spacing: [2, 'always']
operator-linebreak: [2, 'after']
quote-props: [2, 'consistent-as-needed']
quotes: [2, 'single', 'avoid-escape']
radix: 2
semi-spacing: 0
semi: [2, 'always']
space-before-blocks: 2
space-before-function-paren: [2, { anonymous: 'always', named: 'never' }]
space-infix-ops: 2
space-unary-ops: 2
strict: [2, 'global']
wrap-regex: 2
4 changes: 2 additions & 2 deletions lib/mailer.js
Expand Up @@ -113,8 +113,8 @@ Mailer.prototype.send = function (item) {
'X-Mailer': this.name
},

to: options.recipient,
from: options.from,
to: options.recipient,
from: options.from,
subject: options.subject,

text: options.text,
Expand Down
8 changes: 8 additions & 0 deletions test/.eslintrc
@@ -0,0 +1,8 @@
# vi: set ft=yaml

env:
mocha: true
rules:
max-nested-callbacks: [2, 8]
max-len: 0
no-console: 0

0 comments on commit f8ea562

Please sign in to comment.