yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.37k stars 2.72k forks source link

Use ES6 import syntax everywhere #3394

Open bestander opened 7 years ago

bestander commented 7 years ago

Do you want to request a feature or report a bug? refactoring

What is the expected behavior?

We need to use ES6 imports for all code and not a mix of imports and requires. This will make code more consistent and easier to automate with tools

rally25rs commented 7 years ago

Could consider adding this ESLint plugin https://github.com/benmosher/eslint-plugin-import and use the no-commonjs rule in .eslintrc

Report CommonJS require calls and module.exports or exports. (no-commonjs)

abdulhannanali commented 6 years ago

Thanks for the suggestion @rally25rs this eslint plugin seems to be quite configurable to handle different scenarios. I am going to take a shot in integrating this.