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

Upgrade ESLint and fix broken rules #41

Closed
wants to merge 2 commits into from
Closed

Upgrade ESLint and fix broken rules #41

wants to merge 2 commits into from

Conversation

cherewaty
Copy link
Collaborator

I noticed on our builds of thefrontside/ui-eholdings that we were still getting WARN: 'Warning: Accessing PropTypes via the main React package is deprecated, and will be removed in React v16.0. Use the latest available v15.* prop-types package from npm instead. For info on usage, compatibility, migration and more, see https://fb.me/prop-types-docs', even though I thought it had been resolved with folio-org/stripes-components#45.

It turns out I missed one - in searching for React.PropTypes, I didn't notice an instance of import React, { PropTypes } from 'react';.

That would've been caught by the ESLint react/no-deprecated rule provided as part of eslint-config-airbnb, but the error was not being thrown. I upgraded all the eslint-related packages, and then there were errors in my editor and when running yarn lint (react-no-deprecated also needed to know the target react version to pop up).

I fixed all the linting errors, with only a few uses of eslint-disable-line.

Next Steps

It would be awesome if we ran the linter as part of a continuous integration environment, so future pull requests to stripes-core with ESLint errors could not be merged.

@cherewaty
Copy link
Collaborator Author

Related to folio-org/stripes-components#54

@@ -12,6 +20,7 @@
"no-unused-vars": [ 1, { argsIgnorePattern: "^_" } ],
"curly": "off",
"no-plusplus": "off",
"no-continue": "off"
"no-continue": "off",
"jsx-a11y/href-no-hash": "off"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@cherewaty
Copy link
Collaborator Author

Replaced by #42

@cherewaty cherewaty closed this Sep 22, 2017
@cherewaty cherewaty deleted the jc/eslint-with-fixes branch October 3, 2017 22:07
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.

1 participant