/
home
/
techb158
/
balavpn.abdallabala.com
/
node_modules
/
eslint-plugin-import
/
docs
/
rules
/
/home/techb158/balavpn.abdallabala.com/node_modules/eslint-plugin-import/docs/rules
mkdir
upload
Name
Size
Mode
Actions
consistent-type-specifier-style.md
2822
0666
edit
dl
rm
default.md
2016
0666
edit
dl
rm
dynamic-import-chunkname.md
3288
0666
edit
dl
rm
enforce-node-protocol-usage.md
2122
0666
edit
dl
rm
export.md
998
0666
edit
dl
rm
exports-last.md
935
0666
edit
dl
rm
extensions.md
7558
0666
edit
dl
rm
first.md
2230
0666
edit
dl
rm
group-exports.md
2419
0666
edit
dl
rm
imports-first.md
424
0666
edit
dl
rm
max-dependencies.md
1836
0666
edit
dl
rm
named.md
2610
0666
edit
dl
rm
namespace.md
2833
0666
edit
dl
rm
newline-after-import.md
2903
0666
edit
dl
rm
no-absolute-path.md
1486
0666
edit
dl
rm
no-amd.md
977
0666
edit
dl
rm
no-anonymous-default-export.md
2235
0666
edit
dl
rm
no-commonjs.md
2231
0666
edit
dl
rm
no-cycle.md
3752
0666
edit
dl
rm
no-default-export.md
1217
0666
edit
dl
rm
no-deprecated.md
1478
0666
edit
dl
rm
no-duplicates.md
3542
0666
edit
dl
rm
no-dynamic-require.md
780
0666
edit
dl
rm
no-empty-named-blocks.md
866
0666
edit
dl
rm
no-extraneous-dependencies.md
4879
0666
edit
dl
rm
no-import-module-exports.md
1780
0666
edit
dl
rm
no-internal-modules.md
2927
0666
edit
dl
rm
no-mutable-exports.md
1433
0666
edit
dl
rm
no-named-as-default-member.md
1413
0666
edit
dl
rm
no-named-as-default.md
1383
0666
edit
dl
rm
no-named-default.md
705
0666
edit
dl
rm
no-named-export.md
1472
0666
edit
dl
rm
no-namespace.md
993
0666
edit
dl
rm
no-nodejs-modules.md
829
0666
edit
dl
rm
no-relative-packages.md
1490
0666
edit
dl
rm
no-relative-parent-imports.md
2621
0666
edit
dl
rm
no-restricted-paths.md
4853
0666
edit
dl
rm
no-self-import.md
417
0666
edit
dl
rm
no-unassigned-import.md
2001
0666
edit
dl
rm
no-unresolved.md
4315
0666
edit
dl
rm
no-unused-modules.md
3422
0666
edit
dl
rm
no-useless-path-segments.md
2582
0666
edit
dl
rm
no-webpack-loader-syntax.md
1081
0666
edit
dl
rm
order.md
29632
0666
edit
dl
rm
prefer-default-export.md
3263
0666
edit
dl
rm
unambiguous.md
1913
0666
edit
dl
rm
Edit:
/home/techb158/balavpn.abdallabala.com/node_modules/eslint-plugin-import/docs/rules/default.md
(2016B)
# import/default 💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`. <!-- end auto-generated rule header --> If a default import is requested, this rule will report if there is no default export in the imported module. For [ES7], reports if a default is named and exported but is not found in the referenced module. Note: for packages, the plugin will find exported names from [`jsnext:main`], if present in `package.json`. Redux's npm module includes this key, and thereby is lintable, for example. A module path that is [ignored] or not [unambiguously an ES module] will not be reported when imported. [ignored]: ../README.md#importignore [unambiguously an ES module]: https://github.com/bmeck/UnambiguousJavaScriptGrammar ## Rule Details Given: ```js // ./foo.js export default function () { return 42 } // ./bar.js export function bar() { return null } // ./baz.js module.exports = function () { /* ... */ } // node_modules/some-module/index.js exports.sharedFunction = function shared() { /* ... */ } ``` The following is considered valid: ```js import foo from './foo' // assuming 'node_modules' are ignored (true by default) import someModule from 'some-module' ``` ...and the following cases are reported: ```js import bar from './bar' // no default export found in ./bar import baz from './baz' // no default export found in ./baz ``` ## When Not To Use It If you are using CommonJS and/or modifying the exported namespace of any module at runtime, you will likely see false positives with this rule. This rule currently does not interpret `module.exports = ...` as a `default` export, either, so such a situation will be reported in the importing module. ## Further Reading - Lee Byron's [ES7] export proposal - [`import/ignore`] setting - [`jsnext:main`] (Rollup) [ES7]: https://github.com/leebyron/ecmascript-more-export-from [`import/ignore`]: ../../README.md#importignore [`jsnext:main`]: https://github.com/rollup/rollup/wiki/jsnext:main
Save
cmd:
run