This functionality is better provided by: https://github.com/benmosher/eslint-plugin-import
I'd suggest using that module instad.
ESLint rules for JavaScript modules.
npm install --save-dev eslint-plugin-modules
Add the following to your .eslintrc
file:
"plugins": [
"modules"
]
All of these rules have to do with JavaScript modules in one way or another.
no-define
- avoid AMD style define()no-cjs
- prefer es6 modules to CJS style require()no-exports-typo
- avoid typos in your module.exportsno-mix-default-named
- disallow using both named and default es6 exports