Skip to content

Commit

Permalink
[Dev Deps] update eslint, @ljharb/eslint-config; add `safe-publis…
Browse files Browse the repository at this point in the history
…h-latest`
  • Loading branch information
ljharb committed Nov 12, 2019
1 parent 600f4b3 commit 5809415
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
12 changes: 11 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,15 @@
"string": true
}],
"no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"]
}
},

"overrides": [
{
"files": "test/**",
"rules": {
"func-name-matching": 0,
"prefer-regex-literals": 0,
},
},
],
}
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"license": "MIT",
"main": "index.js",
"scripts": {
"prepublish": "safe-publish-latest",
"pretest": "npm run --silent lint",
"test": "npm run --silent tests-only",
"posttest": "npx aud",
Expand Down Expand Up @@ -51,16 +52,17 @@
"object.entries": "^1.1.0"
},
"devDependencies": {
"@ljharb/eslint-config": "^14.1.0",
"@ljharb/eslint-config": "^15.0.1",
"core-js": "^2.6.5 || ^3",
"covert": "^1.1.1",
"es6-shim": "^0.35.5",
"eslint": "^6.3.0",
"eslint": "^6.6.0",
"foreach": "^2.0.5",
"has-symbols": "^1.0.0",
"make-arrow-function": "^1.1.0",
"make-generator-function": "^1.1.0",
"replace": "^1.1.1",
"safe-publish-latest": "^1.1.4",
"semver": "^6.3.0",
"tape": "^4.11.0"
},
Expand All @@ -85,5 +87,10 @@
},
"engines": {
"node": ">= 0.4"
},
"greenkeeper": {
"ignore": [
"core-js"
]
}
}
14 changes: 0 additions & 14 deletions test/.eslintrc

This file was deleted.

2 changes: 2 additions & 0 deletions why.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ if (!getPrototypeOf) {
oldConstructor;
if (has(obj, 'constructor')) {
oldConstructor = constructor;
// eslint-disable-next-line no-param-reassign
if (!(delete obj.constructor)) { // reset constructor
return null; // can't delete obj.constructor, return null
}
constructor = obj.constructor; // get real constructor
// eslint-disable-next-line no-param-reassign
obj.constructor = oldConstructor; // restore constructor
}
return constructor ? constructor.prototype : ObjectPrototype; // needed for IE
Expand Down

0 comments on commit 5809415

Please sign in to comment.