web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
570 B

  1. # import/no-named-default
  2. Reports use of a default export as a locally named import.
  3. Rationale: the syntax exists to import default exports expressively, let's use it.
  4. ## Rule Details
  5. Given:
  6. ```js
  7. // foo.js
  8. export default 'foo';
  9. export const bar = 'baz';
  10. ```
  11. ...these would be valid:
  12. ```js
  13. import foo from './foo.js';
  14. import foo, { bar } from './foo.js';
  15. ```
  16. ...and these would be reported:
  17. ```js
  18. // message: Using exported name 'bar' as identifier for default export.
  19. import { default as foo } from './foo.js';
  20. import { default as foo, bar } from './foo.js';
  21. ```