Skip to content

feat(tsconfig-loader): extends config from node_modules - #106

Merged
jonaskello merged 1 commit into
jonaskello:masterfrom
zorji:extends-from-node-modules
Jul 6, 2021
Merged

feat(tsconfig-loader): extends config from node_modules#106
jonaskello merged 1 commit into
jonaskello:masterfrom
zorji:extends-from-node-modules

Conversation

@zorji

@zorji zorji commented Feb 17, 2020

Copy link
Copy Markdown
Contributor

At the moment, when an extends path is specified, the extends path has to be relative to the overriding tsconfig.json file.

However, in the implementation of tsc --showConfig, it also supports search from node_modules in the same current directory.

e.g.

If a base file exists in node_modules/my-package/tsconfig.base.json.

Both

{
  "extends": "./node_modules/my-package/tsconfig.base.json"
}

and

{
  "extends": "my-package/tsconfig.base.json"
}

have the same effect.

Because tsc behaves like this, tsconfig-paths should be consistent.

@codecov

codecov Bot commented Feb 17, 2020

Copy link
Copy Markdown

Codecov Report

Merging #106 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #106   +/-   ##
=====================================
  Coverage       0%     0%           
=====================================
  Files           4      4           
  Lines         129    129           
  Branches       52     52           
=====================================
  Misses        129    129

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ace8a1...843cd2d. Read the comment docs.

@yusufkandemir yusufkandemir left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me, tested it locally and confirm that it works as expected 🚀 Thanks, @zorji. @Jontem @jonaskello kind ping to remind about the existence of this PR.

@jonaskello

Copy link
Copy Markdown
Owner

Ok let's merge this :-)

@jonaskello
jonaskello merged commit c49386c into jonaskello:master Jul 6, 2021
@jonaskello

Copy link
Copy Markdown
Owner

Released in 3.10.0.

@zorji

zorji commented Aug 17, 2021

Copy link
Copy Markdown
Contributor Author

I am using this change but I found that it's still broken for eslint because I also need to fix match-path-* (used by eslint-import-typescript).

I'll create a PR later today or tomorrow.

@johankristiansson @yusufkandemir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants