ember-cli / ember-cli/eslint-plugin-ember

Not recommended: require-fetch-import

Open
#1,224 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
263
Forks
214
Avg merge
30m
Merged PRs (30d)
5

Description

I see that there is a [plan to add require-fetch-import to the recommended rule set](https://github.com/ember-cli/eslint-plugin-ember/issues/1169).

I don't think this is a good idea. It pushes people toward a pattern that we are already trying to kill: importing from paths that aren't real packages.

At a minimum, I don't think we should enable this by default until https://github.com/ember-cli/ember-fetch/issues/330 is addressed.

Personally, I don't think it's appropriate to require people to import `fetch` at all. It's a web standard, linting against it in people's code is contrary to our efforts to bring ember into better alignment with javascript-ecosystem-wide standards, and the global `fetch` is equally easy to patch/polyfill in all environments (like tests and fastboot) where it's helpful to do that.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.