facebookarchive / nuclide

An open IDE for web and native mobile development, built on top of Atom
https://nuclide.io
Other
7.79k stars 682 forks source link

[format-js] ES2015 Module support #329

Open DaleLJefferson opened 8 years ago

DaleLJefferson commented 8 years ago

It seems all of the code mods work with require statements and not import statements, by default (with "add missing Requires") it adds duplicate requires for all of my import statements.

const React = require('React');

import React from 'react';
johnislarry commented 8 years ago

cc @kyldvs who maintains this

kyldvs commented 8 years ago

Yeah this would be a good feature to add behind an option. I maintain this plugin as a side-project, so PRs welcome :)

zertosh commented 8 years ago

And I'd be more than happy to approve it!