No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

README.md 1.3 KiB

hace 3 años
1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # eslint-import-resolver-node
  2. [![npm](https://img.shields.io/npm/v/eslint-import-resolver-node.svg)](https://www.npmjs.com/package/eslint-import-resolver-node)
  3. Default Node-style module resolution plugin for [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import).
  4. Published separately to allow pegging to a specific version in case of breaking
  5. changes.
  6. Config is passed directly through to [`resolve`](https://www.npmjs.com/package/resolve#resolve-sync-id-opts) as options:
  7. ```yaml
  8. settings:
  9. import/resolver:
  10. node:
  11. extensions:
  12. # if unset, default is just '.js', but it must be re-added explicitly if set
  13. - .js
  14. - .jsx
  15. - .es6
  16. - .coffee
  17. paths:
  18. # an array of absolute paths which will also be searched
  19. # think NODE_PATH
  20. - /usr/local/share/global_modules
  21. # this is technically for identifying `node_modules` alternate names
  22. moduleDirectory:
  23. - node_modules # defaults to 'node_modules', but...
  24. - bower_components
  25. - project/src # can add a path segment here that will act like
  26. # a source root, for in-project aliasing (i.e.
  27. # `import MyStore from 'stores/my-store'`)
  28. ```
  29. or to use the default options:
  30. ```yaml
  31. settings:
  32. import/resolver: node
  33. ```