diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 000000000..dcd5b3b8c --- /dev/null +++ b/.eslintrc @@ -0,0 +1,47 @@ +# vim: ft=yaml + +env: + browser: true + +rules: + block-scoped-var: 2 + complexity: [2, 5] + dot-location: 2 + default-case: 2 + guard-for-in: 2 + no-div-regex: 2 + no-param-reassign: 2 + no-eq-null: 2 + no-floating-decimal: 2 + no-self-compare: 2 + no-throw-literal: 2 + no-void: 2 + radix: 2 + wrap-iife: 2 + brace-style: [2, "1tbs", {"allowSingleLine": true}] + comma-style: [2, "last"] + consistent-this: [2, "self"] + func-names: 2 + func-style: [2, "declaration"] + indent: [2, 4, {"indentSwitchCase": true}] + linebreak-style: [2, "unix"] + max-nested-callbacks: [2, 3] + no-lonely-if: 2 + no-multiple-empty-lines: [2, {"max": 2}] + no-nested-ternary: 2 + no-unneeded-ternary: 2 + operator-assignment: [2, "always"] + operator-linebreak: [2, "after"] + space-after-keywords: [2, "always"] + space-before-blocks: [2, "always"] + space-before-function-paren: [2, {"anonymous": "always", "named": "never"}] + space-in-brackets: [2, "never"] + space-in-parens: [2, "never"] + space-unary-ops: [2, {"words": true, "nonwords": false}] + spaced-line-comment: [2, "always"] + max-depth: [2, 5] + max-len: [2, 79, 4] + max-params: [2, 5] + max-statements: [2, 20] + no-bitwise: 2 + no-reserved-keys: 2