Skip to content

Commit 586ea46

Browse files
authored
ref: Unify code style using Prettier and update ESLint rules
* Add Prettier, precommit hook using Husky and update ESLint to play nicely with Prettier. * Run new code-style setup on all relevant .js files, without any changes in the code itself. * Update ESLint version and unify package.json with the one from raven-node. * Add lint script to package.json and configure .eslintignore, so it can be used by Grunt and npm.
1 parent 9730997 commit 586ea46

28 files changed

+8885
-7501
lines changed

.eslintignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
build/
2+
dist/
3+
example/
4+
vendor/
5+
test/
6+

.eslintrc

+11-40
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,16 @@
1111
},
1212
"rules": {
1313
"block-scoped-var": 2,
14-
"comma-dangle": [2, "never"],
15-
"dot-notation": [
16-
2,
17-
{
18-
"allowKeywords": false
19-
}
20-
],
21-
"eqeqeq": [
22-
2,
23-
"allow-null"
24-
],
14+
"dot-notation": [2, {"allowKeywords": false}],
15+
"eqeqeq": [2, "allow-null"],
2516
"guard-for-in": 2,
2617
"new-cap": 2,
2718
"no-caller": 2,
28-
"no-cond-assign": [
29-
2,
30-
"except-parens"
31-
],
19+
"no-cond-assign": [2, "except-parens"],
3220
"no-debugger": 2,
3321
"no-empty": 2,
3422
"no-eval": 2,
3523
"no-extend-native": 2,
36-
"no-extra-parens": 2,
3724
"no-irregular-whitespace": 2,
3825
"no-iterator": 2,
3926
"no-loop-func": 2,
@@ -44,29 +31,13 @@
4431
"no-sequences": 2,
4532
"no-shadow": 2,
4633
"no-undef": 2,
47-
"no-unused-vars": [
48-
2,
49-
{"args": "none"}
50-
],
34+
"no-unused-vars": [2, {"args": "none"}],
5135
"no-with": 2,
52-
"quotes": [
53-
2,
54-
"single",
55-
"avoid-escape"
56-
],
57-
"semi": [
58-
0,
59-
"never"
60-
],
61-
"strict": [
62-
2,
63-
"global"
64-
],
65-
"valid-typeof": 2,
66-
"wrap-iife": [
67-
2,
68-
"inside"
69-
],
70-
"eol-last": 2
71-
}
36+
"semi": [0, "never"],
37+
"strict": [2, "global"],
38+
"valid-typeof": 2
39+
},
40+
"extends": [
41+
"prettier"
42+
]
7243
}

0 commit comments

Comments
 (0)