eslint-plugin-codebox
eslint-plugin-codebox copied to clipboard
Export functionality
How is destructuring export
?
Something is like this is pretty easy to be sorted alphabetically right?
export {
getListLand,
getLandDetail,
addLand,
addFarmer,
getUserProfile,
updateUserProfile
};
Best Regards,
That's a good feature to add, I'll take a look at it this weekend
What do you think, how should it work with something like export { something as default }
, as a separate entity or in context of every other export?
I would prefer the latter
Hi @asn007,
From Airbnb style guide: https://github.com/airbnb/javascript#modules--no-export-from-import
// bad
// filename es6.js
export { es6 as default } from './AirbnbStyleGuide';
// good
// filename es6.js
import { es6 } from './AirbnbStyleGuide';
export default es6;
Should not allow user to do export { es6 as default }
, use export default es6;
instead.
Btw, if there are export
and export default
in the same file, the export default
should be in the last statement.
e.g.
export {
getListLand,
getLandDetail,
addLand,
addFarmer,
getUserProfile,
updateUserProfile
};
export default api;