Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update ESLint to 6.0.0 #1593

Merged
merged 7 commits into from
Jun 23, 2019
Merged

Conversation

mastermatt
Copy link
Member

Supersedes #1592

ESLint offers a migration guide for their newest major release. There were two issues that kept nock from simply upgrading.

  • The version of eslint-plugin-import listed in the package-lock.json was not compatible. The newest version of the plugin works and is within the range already defined in package.json so I simply performed lockfile maintenance (regenerating the lockfile from scratch).
  • eslint:recommended was changed. The only new rule that really affected nock was no-prototype-builtins.

I also noticed we still had some instances of the deprecated assert.equal in tests so I updated those to use the preferred assert.strictEqual.

Copy link
Member

@paulmelnikow paulmelnikow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Requested one change, feel free to merge when ready!

lib/back.js Outdated
@@ -266,7 +264,7 @@ const Modes = {
}

Back.setMode = function(mode) {
if (!Modes.hasOwnProperty(mode)) {
if (!Object.prototype.hasOwnProperty.call(Modes, mode)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we replace these hasOwnProperty calls with mode in Modes?

this[propName] = overrider[propName]
}
}
Object.assign(this, overrider)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nockbot
Copy link
Collaborator

nockbot commented Jul 7, 2019

🎉 This PR is included in version 11.0.0-beta.21 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nockbot
Copy link
Collaborator

nockbot commented Aug 12, 2019

🎉 This PR is included in version 11.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

gr2m pushed a commit that referenced this pull request Sep 4, 2019
* chore(package): update eslint to version 6.0.0
* chore: lockfile maintenance
* refactor: changes required for eslint v6 updated `recommend`ed rules

* chore: remove no longer needed lint rule overrides

* refactor: replace deprecated `assert.equal` -> `assert.strictEqual`
gr2m pushed a commit that referenced this pull request Sep 4, 2019
* chore(package): update eslint to version 6.0.0
* chore: lockfile maintenance
* refactor: changes required for eslint v6 updated `recommend`ed rules

* chore: remove no longer needed lint rule overrides

* refactor: replace deprecated `assert.equal` -> `assert.strictEqual`
gr2m pushed a commit that referenced this pull request Sep 5, 2019
* chore(package): update eslint to version 6.0.0
* chore: lockfile maintenance
* refactor: changes required for eslint v6 updated `recommend`ed rules

* chore: remove no longer needed lint rule overrides

* refactor: replace deprecated `assert.equal` -> `assert.strictEqual`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants