forked from mattphillips/deep-object-diff
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit 98d05ee
Add eslint to enforce no-prototype-builtins
The way to prevent issues like mattphillips#58 is not obvious, and I would expect
not all programmers to have memorised the contents of
`Object.prototype`, so I think it would be prudent to check for such
issues automatically.
The no-prototype-builtins rule is enforced automatically by the set of
rules enabled in `.eslintrc.json` by
"extends": "eslint:recommended"
It's a great sign that all the other enabled rules also pass without
modifications!
I've added the eslint invocation to `package.json`'s `posttest` field.
This should make the check minimally intrusive while developing, as it
will only run when the functional tests (via `jest`) pass first.1 parent b281292 commit 98d05ee
3 files changed
+548
-3
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 | - | ||
18 | + | ||
19 | + | ||
19 | 20 |
| |
20 | 21 |
| |
21 | 22 |
| |
| |||
30 | 31 |
| |
31 | 32 |
| |
32 | 33 |
| |
34 | + | ||
33 | 35 |
| |
34 | 36 |
| |
35 | 37 |
| |
|
0 commit comments