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

chore: fix for deprecated eslint rule #165

Merged
merged 2 commits into from
Sep 15, 2016
Merged

chore: fix for deprecated eslint rule #165

merged 2 commits into from
Sep 15, 2016

Conversation

cwonrails
Copy link
Contributor

@cwonrails cwonrails commented Sep 15, 2016

Closes #164

Replaces the deprecated react/require-extension in .eslintrc with the recommended import/extensions rule from eslint-plugin-import.

Additionally, applies this fix to prevent the following (now incorrect) console output: The react/require-extension rule is deprecated. Please use the import/extensions rule from eslint-plugin-import instead.

See these lines in eslint-config-airbnb for the relevant TODO.

@tizmagik
Copy link
Contributor

Thanks @cwonrails ! We'll need to remember to follow up on this when import-js/eslint-plugin-import#390 lands.

Copy link
Contributor

@tizmagik tizmagik left a comment

Choose a reason for hiding this comment

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

I'll leave to @ccpricenytimes for an additional check & merge.

Copy link
Contributor

@ccpricenytimes ccpricenytimes left a comment

Choose a reason for hiding this comment

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

Looks awesome. One tiny change

@@ -20,7 +20,8 @@
"prefer-reflect": 2,
"no-warning-comments": [1, { "terms": ["todo", "fixme"], "location": "start" }],
"react/sort-comp": 0,
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/require-extension": "off",
"import/extensions": [1, { "js": "never", "jsx": "never" }],
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove jsx here since kyt doesn't support that extension.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix pushed, let me know if I should squash or amend the original instead based on the Times' preference.

Copy link
Contributor

Choose a reason for hiding this comment

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

We squash & merge PRs, so it should be fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

I can squash when we merge from github so separate commits is fine

Copy link
Contributor Author

@cwonrails cwonrails Sep 15, 2016

Choose a reason for hiding this comment

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

Great, thanks! Here's the followup commit: c7dadc3

@cwonrails
Copy link
Contributor Author

Definitely, thanks! Given that the version of eslint-plugin-import in package.json is now outdated, would a separate PR bumping the outdated dependencies be in order?
screen shot 2016-09-15 at 4 46 54 pm

Copy link
Contributor

@ccpricenytimes ccpricenytimes left a comment

Choose a reason for hiding this comment

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

Looks great and works for me!

@ccpricenytimes ccpricenytimes merged commit 2d72505 into nytimes:master Sep 15, 2016
tizmagik added a commit that referenced this pull request Sep 15, 2016
* master:
  fix for deprecated eslint rule (#165)

# Conflicts:
#	.eslintrc
tizmagik added a commit that referenced this pull request Sep 19, 2016
* feature/jest:
  Remove unused README
  PR comments
  Add reference to jest config
  fix for deprecated eslint rule (#165)
@cwonrails cwonrails deleted the upstream-eslint-fix branch September 20, 2016 19:55
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.

react/require-extension is deprecated
3 participants