Skip to content

Commit 7876650

Browse files
committed
use eslint. lint
1 parent 5359c63 commit 7876650

File tree

7 files changed

+176
-50
lines changed

7 files changed

+176
-50
lines changed

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
end_of_line = lf
7+
charset = utf-8
8+
indent_size = 2
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
insert_final_newline = false
15+
16+
[test/**]
17+
trim_trailing_whitespace = false
18+
insert_final_newline = false
19+
20+
[templates/**]
21+
trim_trailing_whitespace = false
22+
insert_final_newline = false

.eslintrc

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
{
2+
"ecmaFeatures": {
3+
"modules": true,
4+
"experimentalObjectRestSpread": true
5+
},
6+
7+
"env": {
8+
"browser": false,
9+
"es6": true,
10+
"node": true,
11+
"mocha": true
12+
},
13+
14+
"globals": {
15+
"document": false,
16+
"navigator": false,
17+
"window": false
18+
},
19+
20+
"rules": {
21+
"accessor-pairs": 2,
22+
"arrow-spacing": [2, { "before": true, "after": true }],
23+
"block-spacing": [2, "always"],
24+
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
25+
"comma-dangle": [2, "never"],
26+
"comma-spacing": [2, { "before": false, "after": true }],
27+
"comma-style": [2, "last"],
28+
"constructor-super": 2,
29+
"curly": [2, "multi-line"],
30+
"dot-location": [2, "property"],
31+
"eol-last": 2,
32+
"eqeqeq": [2, "allow-null"],
33+
"generator-star-spacing": [2, { "before": true, "after": true }],
34+
"handle-callback-err": [2, "^(err|error)$" ],
35+
"indent": [2, 2, { "SwitchCase": 1 }],
36+
"key-spacing": [2, { "beforeColon": false, "afterColon": true }],
37+
"new-cap": [2, { "newIsCap": true, "capIsNew": false }],
38+
"new-parens": 2,
39+
"no-array-constructor": 2,
40+
"no-caller": 2,
41+
"no-class-assign": 2,
42+
"no-cond-assign": 2,
43+
"no-const-assign": 2,
44+
"no-control-regex": 2,
45+
"no-debugger": 2,
46+
"no-delete-var": 2,
47+
"no-dupe-args": 2,
48+
"no-dupe-class-members": 2,
49+
"no-dupe-keys": 2,
50+
"no-duplicate-case": 2,
51+
"no-empty-character-class": 2,
52+
"no-empty-label": 2,
53+
"no-eval": 2,
54+
"no-ex-assign": 2,
55+
"no-extend-native": 2,
56+
"no-extra-bind": 2,
57+
"no-extra-boolean-cast": 2,
58+
"no-extra-parens": [2, "functions"],
59+
"no-fallthrough": 2,
60+
"no-floating-decimal": 2,
61+
"no-func-assign": 2,
62+
"no-implied-eval": 2,
63+
"no-inner-declarations": [2, "functions"],
64+
"no-invalid-regexp": 2,
65+
"no-irregular-whitespace": 2,
66+
"no-iterator": 2,
67+
"no-label-var": 2,
68+
"no-labels": 2,
69+
"no-lone-blocks": 2,
70+
"no-mixed-spaces-and-tabs": 2,
71+
"no-multi-spaces": 2,
72+
"no-multi-str": 2,
73+
"no-multiple-empty-lines": [2, { "max": 1 }],
74+
"no-native-reassign": 2,
75+
"no-negated-in-lhs": 2,
76+
"no-new": 2,
77+
"no-new-func": 2,
78+
"no-new-object": 2,
79+
"no-new-require": 2,
80+
"no-new-wrappers": 2,
81+
"no-obj-calls": 2,
82+
"no-octal": 2,
83+
"no-octal-escape": 2,
84+
"no-proto": 0,
85+
"no-redeclare": 2,
86+
"no-regex-spaces": 2,
87+
"no-return-assign": 2,
88+
"no-self-compare": 2,
89+
"no-sequences": 2,
90+
"no-shadow-restricted-names": 2,
91+
"no-spaced-func": 2,
92+
"no-sparse-arrays": 2,
93+
"no-this-before-super": 2,
94+
"no-throw-literal": 2,
95+
"no-trailing-spaces": 0,
96+
"no-undef": 2,
97+
"no-undef-init": 2,
98+
"no-unexpected-multiline": 2,
99+
"no-unneeded-ternary": [2, { "defaultAssignment": false }],
100+
"no-unreachable": 2,
101+
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
102+
"no-useless-call": 0,
103+
"no-with": 2,
104+
"one-var": [0, { "initialized": "never" }],
105+
"operator-linebreak": [0, "after", { "overrides": { "?": "before", ":": "before" } }],
106+
"padded-blocks": [0, "never"],
107+
"quotes": [2, "single", "avoid-escape"],
108+
"radix": 2,
109+
"semi": [2, "always"],
110+
"semi-spacing": [2, { "before": false, "after": true }],
111+
"space-after-keywords": [2, "always"],
112+
"space-before-blocks": [2, "always"],
113+
"space-before-function-paren": [2, "never"],
114+
"space-before-keywords": [2, "always"],
115+
"space-in-parens": [2, "never"],
116+
"space-infix-ops": 2,
117+
"space-return-throw-case": 2,
118+
"space-unary-ops": [2, { "words": true, "nonwords": false }],
119+
"spaced-comment": [0, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }],
120+
"use-isnan": 2,
121+
"valid-typeof": 2,
122+
"wrap-iife": [2, "any"],
123+
"yoda": [2, "never"]
124+
}
125+
}

.jshintrc

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

.travis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
sudo: false
12
language: node_js
23
node_js:
3-
- '0.10'
4+
- "stable"
5+
- "0.12"
6+
- "0.10"
7+
matrix:
8+
fast_finish: true
9+
allow_failures:
10+
- node_js: "0.10"

.verb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{%= apidocs("index.js") %}
1111

1212
## Related projects
13-
{%= related(verb.related.list, {remove: name}) %}
13+
{%= related(verb.related.list) %}
1414

1515
## Running tests
1616
{%= include("tests") %}

LICENSE

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014-2015 Jon Schlinkert.
3+
Copyright (c) 2014-2015, Jon Schlinkert.
44

5-
Permission is hereby granted, free of charge, to any person
6-
obtaining a copy of this software and associated documentation
7-
files (the "Software"), to deal in the Software without
8-
restriction, including without limitation the rights to use,
9-
copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
copies of the Software, and to permit persons to whom the
11-
Software is furnished to do so, subject to the following
12-
conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
1311

14-
The above copyright notice and this permission notice shall be
15-
included in all copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
1614

17-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19-
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24-
OTHER DEALINGS IN THE SOFTWARE.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
"description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.",
44
"version": "2.0.0",
55
"homepage": "https://github.com/jonschlinkert/arr-diff",
6-
"author": {
7-
"name": "Jon Schlinkert",
8-
"url": "https://github.com/jonschlinkert"
9-
},
6+
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
107
"repository": "jonschlinkert/arr-diff",
118
"bugs": {
129
"url": "https://github.com/jonschlinkert/arr-diff/issues"
@@ -30,8 +27,8 @@
3027
"array-slice": "^0.2.3",
3128
"benchmarked": "^0.1.4",
3229
"chalk": "^1.1.1",
33-
"mocha": "^2.2.5",
34-
"should": "^7.0.4"
30+
"mocha": "*",
31+
"should": "*"
3532
},
3633
"keywords": [
3734
"arr",
@@ -49,4 +46,4 @@
4946
]
5047
}
5148
}
52-
}
49+
}

0 commit comments

Comments
 (0)