Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Using absolute paths in require calls #67

Open
janodvarko opened this issue Nov 15, 2019 · 0 comments
Open

Using absolute paths in require calls #67

janodvarko opened this issue Nov 15, 2019 · 0 comments

Comments

@janodvarko
Copy link
Member

It would be great to have unified approach to module paths we are passing to require calls.
We are currently mixing absolute and relative paths, which doesn't seem ideal.

Examples:

require("devtools/client/shared/vendor/react-prop-types");`
require("../utils/request-utils");

Preferring absolute paths might have positive impact:

  • easy to lint
  • easier refactoring (easier to find consumers of give module)
  • easier to handle ES Modules and import
  • easier search in general

WDYT?

Honza

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant