Giter Site home page Giter Site logo

un-ts / eslint-import-resolver-ts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from import-js/eslint-import-resolver-typescript

14.0 14.0 0.0 672 KB

This plugin adds TypeScript support to `eslint-plugin-import`.

Home Page: https://github.com/import-js/eslint-import-resolver-typescript

JavaScript 14.33% TypeScript 80.56% Shell 5.11%
eslint-import eslint-import-plugin eslint-import-resolver eslint-import-resolver-typescript eslint-typescript typescript

eslint-import-resolver-ts's People

Contributors

alexgorbatchev avatar bradzacher avatar chrisblossom avatar dnalborczyk avatar fuller avatar jhoch avatar jounqin avatar pekala avatar teoxoy avatar vkrol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

eslint-import-resolver-ts's Issues

Usage with baseUrl

This resolver is great, it's already solving a number of issues for us.

We're using it with a monorepo and create-react-app, which doesn't support paths - but does support baseUrl set to src. In that case, we can access a folder in ./src/* as an absolute import - i.e. import { Button } from 'components/Button'.

Perhaps I'm missing something, but I'm still getting errors about unresolved imports in this case, and the import/order rule thinks that my import is external, not internal.

Are you able to offer any advice or suggestions here?

Using globs for `directory` is slow

The recommended config for multiple directories is very slow (./packages/**/tsconfig.json)

This is probably due to the library walking the node_modules directories? Would it be possible to ignore the node_modules folders?

For now, I recommend explicit levels in the directories glob, which is much faster.

"settings": {
    "import/resolver": {
    "ts": {
      "directory": "./*/*/tsconfig.json" // Any package, but don't go deeper than the package root
    }
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.