Page MenuHomePhabricator

Streamline import/require format in the frontend
Open, LowPublic

Description

Description

There are currently 2 different ways dependencies are implemented in the codebase.

// The dependency is directly extracted from the require call
var Foo = require('<path>' ).Foo;

// The dependency is extracted through destructuring
var { Foo } = require('<path>');

Note

  • There is currently no preferred approach to importing dependencies.
  • We need to pick an approach for importing dependencies and convert all imports to use the same approach.
  • This will aid with consistency and reduction of tech debt.

Desired behavior/Acceptance criteria

  • Convert all import statements in JS files to use a consistent import strategy
  • Convert all import statements in Vue files to use a consistent import strategy

Completion checklist