Commit 09cfcde0 authored by Tharaka Wijebandara's avatar Tharaka Wijebandara Committed by Dan Abramov
Browse files

Add lint rule to disallow require.ensure and System.import (#1536)

parent 0ef9e803
Showing with 9 additions and 0 deletions
+9 -0
...@@ -155,6 +155,15 @@ module.exports = { ...@@ -155,6 +155,15 @@ module.exports = {
'unicode-bom': ['warn', 'never'], 'unicode-bom': ['warn', 'never'],
'use-isnan': 'warn', 'use-isnan': 'warn',
'valid-typeof': '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/ // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment