question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Non JS index files are skipped

See original GitHub issue

Given:

// app.js
import helpers from './helpers'
// helpers/index.ts
export default {}

When I run:

madge --extensions js,ts --warning app.js

I get:

Processed 1 file (587ms) (1 warning)

app.js

✖ Skipped 1 file

./helpers

This seems to be because the index file has a .ts extension instead of .js, however I believe this should be supported.

What do you think?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:10
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

12reactions
labarilemcommented, Mar 27, 2019

@marcos-diaz you can pass the –ts-config argument to solve the issue. E.g. npx madge app.ts --ts-config=tsconfig.json

4reactions
adjerbetiancommented, Mar 1, 2020

I managed to make it work with --ts-config=tsconfig.json, but it doesn’t work with the extends option. So you need to provide the tsconfig that has the value compilerOptions.module specified.

In my case, with the structure

packages/
    my-package/
        src/
        tsconfig.json
tsconfig.json

The working command is:

packages/my-package$ madge src/ --extensions ts --ts-config=../../tsconfig.json --image graph.svg
Read more comments on GitHub >

github_iconTop Results From Across the Web

why has my array's index zero been skipped - Stack Overflow
i have an array of subreddits that i want to prefill into taginputs, however, the element at index 0 keeps getting skipped over....
Read more >
Code style ignored in index.js files
Recently my projects started to ignore code style settings in any file names index.js. When viewed in the project directory, files named...
Read more >
FAQ - Troubleshooting problems - Zoom Search Engine
The main reasons for files being skipped and not indexed are: The file or directory name starts with an underscore, e.g. "_notes" and...
Read more >
Parameters affecting what documents we index - - Recoll user ...
Regular file name filter patterns If this is set, only the file names not in skippedNames and matching one of the patterns will...
Read more >
Dependency resolution - Parcel
The file extensions that may be omitted include .ts , .tsx , .js , .jsx , and ... If no package.json is present,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found