Skip to content

Commit 2675b2e

Browse files
author
Philipp Alferov
committed
Refactor eslint rules
1 parent 1b4f9e8 commit 2675b2e

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

.eslintrc

+23-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,31 @@ root: true
22

33
env:
44
node: true
5-
es6: true
65
mocha: true
76

8-
ecmaFeatures:
9-
modules: true
10-
117
extends:
128
"eslint:recommended"
139

14-
globals:
15-
should: true
10+
rules:
11+
array-bracket-spacing: [2, "never"]
12+
block-scoped-var: 2
13+
brace-style: [2, "1tbs"]
14+
camelcase: 1
15+
curly: 2
16+
eol-last: 2
17+
eqeqeq: [2, "smart"]
18+
indent: [2, 2, { "SwitchCase": 1 }]
19+
max-depth: [1, 3]
20+
max-len: [1, 80]
21+
max-statements: [1, 15]
22+
new-cap: 1
23+
no-extend-native: 2
24+
no-mixed-spaces-and-tabs: 2
25+
no-trailing-spaces: 2
26+
no-unused-vars: 1
27+
no-use-before-define: [2, "nofunc"]
28+
object-curly-spacing: [2, "never"]
29+
quotes: [2, "single", "avoid-escape"]
30+
semi: [2, "always"]
31+
space-after-keywords: [2, "always"]
32+
space-unary-ops: 2

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ var groupByParents = function(array, options) {
4141

4242
/**
4343
* arrayToTree
44-
* Convert a plain array of nodes (with pointers to parent nodes) to a nested data structure
44+
* Convert a plain array of nodes (with pointers to parent nodes) to a nested
45+
* data structure
4546
*
4647
* @name arrayToTree
4748
* @function

0 commit comments

Comments
 (0)