Add lint rule to disallow `require.ensure`
We need a lint rule that will error when require.ensure is used.
Users should use import() instead.
I would like to work on this.
Apparently, there is no such a rule comes with eslint-plugin-import. So I'll send a PR to eslint-plugin-import repo first and update eslint-config-react-app accordingly. Is that the correct path to take on this issue? (I'm asking this because I'm new to open source and this project)
Per https://github.com/benmosher/eslint-plugin-import/issues/743#issuecomment-279203692, eslint core already supports no-restricted-properties which can easily block both require.ensure and System.import.
@ljharb Thanks for pointing it out. I'll use no-restricted-properties rule and send a PR.