-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update eslint to v6 #1777
Conversation
@@ -30,7 +30,7 @@ class Uppy { | |||
/** | |||
* Instantiate Uppy | |||
* | |||
* @param {Object} opts — Uppy options | |||
* @param {object} opts — Uppy options |
There was a problem hiding this comment.
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? 🤔
There was a problem hiding this comment.
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.
So what’s up with quotes for every key? 👀 |
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 |
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. |
* 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
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 useObject.prototype.hasOwnProperty.call(obj)
, which works on more objects (eg ones created usingObject.create(null)
)