Skip to content

Commit

Permalink
Add lint rule to disallow require.ensure and System.import
Browse files Browse the repository at this point in the history
  • Loading branch information
tharakawj committed Feb 24, 2017
1 parent 075e729 commit 0d55d13
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/eslint-config-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ module.exports = {
'unicode-bom': ['warn', 'never'],
'use-isnan': 'warn',
'valid-typeof': 'warn',
'no-restricted-properties': ['error', {
object: 'require',
property: 'ensure',
message: 'Please use import() instead. More info: https://webpack.js.org/guides/code-splitting-import/#dynamic-import'
}, {
object: 'System',
property: 'import',
message: 'Please use import() instead. More info: https://webpack.js.org/guides/code-splitting-import/#dynamic-import'
}],

// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/

Expand Down

0 comments on commit 0d55d13

Please sign in to comment.