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

Update eslint to v6 #1777

Merged
merged 11 commits into from
Aug 13, 2019
Merged

Update eslint to v6 #1777

merged 11 commits into from
Aug 13, 2019

Conversation

goto-bus-stop
Copy link
Contributor

So we don't fall behind too much again :)

Standard 13 added some really churny rules, but they are mostly autofixable. If there are merge conflicts with other PRs, they can use their own version and do eslint --fix afterward to resolve it.

The only manual changes here are rewriting obj.hasOwnProperty() calls to use Object.prototype.hasOwnProperty.call(obj), which works on more objects (eg ones created using Object.create(null))

@goto-bus-stop goto-bus-stop requested a review from arturi August 12, 2019 11:07
@@ -30,7 +30,7 @@ class Uppy {
/**
* Instantiate Uppy
*
* @param {Object} opts — Uppy options
* @param {object} opts — Uppy options
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought the new jsdoc rule set actually wanted these capitalized? 🤔

Copy link
Contributor Author

@goto-bus-stop goto-bus-stop Aug 12, 2019

Choose a reason for hiding this comment

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

could be, it might've changed in one of the 10(!) recent major bumps in the jsdoc plugin 😆 this is what it does with --fix in the latest version.

@arturi
Copy link
Contributor

arturi commented Aug 12, 2019

So what’s up with quotes for every key? 👀

@goto-bus-stop
Copy link
Contributor Author

I thought I was undoing a change by adding quotes around locale keys. The new rule is that keys should not be quoted, but I had to add an exception for our generated en_US file because stringify-object always quotes keys. I assumed --fix had removed quotes from the other files, but the other files actually never had them, so i reverted that change in 2d6f382

@goto-bus-stop
Copy link
Contributor Author

Crap, react-scripts complains because it still uses eslint 5 💩

Might be able to get away with just disabling the preflight check tbqh. The dependencies it's concerned about are outside the react-scripts "project root" anyway and not used by it.

@arturi arturi self-requested a review August 13, 2019 18:44
@arturi arturi merged commit c62ec36 into master Aug 13, 2019
@delete-merged-branch delete-merged-branch bot deleted the eslint-6 branch August 13, 2019 18:45
HeavenFox pushed a commit to docsend/uppy that referenced this pull request Jun 27, 2023
* Update eslint

* Do eslint --fix

* Do not access Object.prototype method 'hasOwnProperty' from target object

* utils: add hasProperty

* eslint --fix

* Disable quote-props for locale files

* add back quotes in locale files

* revert locale files to state on master

* Update react-scripts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants