Skip to content

Commit cae9b41

Browse files
committed
Switch to ESLint.
1 parent 641d9ca commit cae9b41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+689
-479
lines changed

.eslintrc

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
{
2+
env: {
3+
node: true,
4+
},
5+
6+
rules: {
7+
// Possible Errors
8+
comma-dangle: [2, "always-multiline"],
9+
no-cond-assign: 0,
10+
no-console: 2,
11+
no-constant-condition: 0,
12+
no-debugger: 2,
13+
no-dupe-args: 2,
14+
no-dupe-keys: 2,
15+
no-duplicate-case: 2,
16+
no-empty: 2,
17+
no-empty-character-class: 2,
18+
no-ex-assign: 2,
19+
no-extra-boolean-cast: 2,
20+
no-extra-parens: 0,
21+
no-extra-semi: 2,
22+
no-func-assign: 2,
23+
no-inner-declarations: 0,
24+
no-invalid-regexp: 2,
25+
no-irregular-whitespace: 2,
26+
no-negated-in-lhs: 2,
27+
no-obj-calls: 2,
28+
no-regex-spaces: 2,
29+
no-sparse-arrays: 2,
30+
no-unreachable: 2,
31+
use-isnan: 2,
32+
valid-jsdoc: 0,
33+
valid-typeof: 2,
34+
no-unexpected-multiline: 2,
35+
36+
// Best Practices
37+
accessor-pairs: 2,
38+
block-scoped-var: 2,
39+
complexity: 0,
40+
consistent-return: 0,
41+
curly: [2, "multi-or-nest"],
42+
default-case: 0,
43+
dot-notation: 2,
44+
dot-location: [2, "property"],
45+
eqeqeq: 2,
46+
guard-for-in: 0,
47+
no-alert: 2,
48+
no-caller: 2,
49+
no-div-regex: 2,
50+
no-else-return: 0,
51+
no-labels: 2,
52+
no-eq-null: 2,
53+
no-eval: 2,
54+
no-extend-native: 2,
55+
no-extra-bind: 2,
56+
no-fallthrough: 2,
57+
no-floating-decimal: 2,
58+
no-implicit-coercion: 0,
59+
no-implied-eval: 2,
60+
no-invalid-this: 2,
61+
no-iterator: 2,
62+
no-lone-blocks: 2,
63+
no-loop-func: 2,
64+
no-multi-spaces: 0,
65+
no-multi-str: 2,
66+
no-native-reassign: 2,
67+
no-new-func: 2,
68+
no-new-wrappers: 2,
69+
no-new: 2,
70+
no-octal-escape: 2,
71+
no-octal: 2,
72+
no-param-reassign: 0,
73+
no-process-env: 2,
74+
no-proto: 2,
75+
no-redeclare: 2,
76+
no-return-assign: 0,
77+
no-script-url: 2,
78+
no-self-compare: 2,
79+
no-sequences: 0, // allow the comma operator
80+
no-throw-literal: 2,
81+
no-unused-expressions: 0,
82+
no-useless-call: 2,
83+
no-void: 2,
84+
no-warning-comments: 0,
85+
no-with: 2,
86+
radix: 2,
87+
vars-on-top: 0,
88+
wrap-iife: [2, "inside"],
89+
yoda: 2,
90+
91+
// Strict Mode
92+
strict: [2, "never"],
93+
94+
// Variables
95+
init-declarations: 0,
96+
no-catch-shadow: 0,
97+
no-delete-var: 2,
98+
no-label-var: 2,
99+
no-shadow-restricted-names: 2,
100+
no-shadow: 0,
101+
no-undef-init: 2,
102+
no-undef: 2,
103+
no-undefined: 0,
104+
no-unused-vars: [ 2, { args: "none" }],
105+
no-use-before-define: [2, "nofunc"],
106+
107+
// Node.js
108+
callback-return: 0,
109+
handle-callback-err: 2,
110+
no-mixed-requires: 0,
111+
no-new-require: 2,
112+
no-path-concat: 2,
113+
no-process-exit: 0,
114+
no-restricted-modules: 2,
115+
no-sync: 0,
116+
117+
// Stylistic Issues
118+
array-bracket-spacing: 2,
119+
block-spacing: 2,
120+
brace-style: [2, "stroustrup", { allowSingleLine: true }],
121+
camelcase: 2,
122+
comma-spacing: 2,
123+
comma-style: 2,
124+
computed-property-spacing: 2,
125+
consistent-this: 0,
126+
eol-last: 2,
127+
func-names: 0,
128+
func-style: [2, "declaration"],
129+
id-length: 0,
130+
id-match: 2,
131+
indent: [2, 2, { VariableDeclarator: 2 }],
132+
key-spacing: 0,
133+
lines-around-comment: 2,
134+
linebreak-style: 2,
135+
max-nested-callbacks: [2, 2],
136+
new-cap: 2,
137+
new-parens: 2,
138+
newline-after-var: 0,
139+
no-array-constructor: 2,
140+
no-continue: 2,
141+
no-inline-comments: 0,
142+
no-lonely-if: 2,
143+
no-mixed-spaces-and-tabs: 2,
144+
no-multiple-empty-lines: 0,
145+
no-nested-ternary: 0,
146+
no-new-object: 2,
147+
no-spaced-func: 2,
148+
no-ternary: 0,
149+
no-trailing-spaces: 2,
150+
no-underscore-dangle: 0,
151+
no-unneeded-ternary: 2,
152+
object-curly-spacing: [2, "always"],
153+
object-curly-newline: 0,
154+
object-property-newline: 0,
155+
one-var: 0,
156+
operator-assignment: 2,
157+
operator-linebreak: [2, "after", { overrides: { ":": "ignore" } }],
158+
padded-blocks: [2, "never"],
159+
quote-props: [2, "consistent-as-needed"],
160+
quotes: [2, "single", "avoid-escape"],
161+
semi-spacing: 2,
162+
semi: 2,
163+
sort-vars: 0,
164+
keyword-spacing: 2,
165+
space-before-blocks: 2,
166+
space-before-function-paren: [2, {"anonymous": "always", "named": "never"}],
167+
space-in-parens: 2,
168+
space-infix-ops: 2,
169+
space-unary-ops: 2,
170+
spaced-comment: [2, "always", { block: { markers: ["!"] } }],
171+
wrap-regex: 0,
172+
},
173+
}

.jshintrc

Lines changed: 0 additions & 22 deletions
This file was deleted.

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ node_js:
33
- "4"
44
- "6"
55
- "node"
6+
script:
7+
- npm run lint
8+
- npm test
69
env:
710
- CXX=g++-4.8
811
addons:

bin/.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
rules: {
3+
no-console: 0,
4+
max-nested-callbacks: 0,
5+
},
6+
}

0 commit comments

Comments
 (0)