Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

extends only works when loading config from file, not passing in as json object #1174

Closed
sixinli opened this issue Apr 28, 2016 · 6 comments
Closed

Comments

@sixinli
Copy link

sixinli commented Apr 28, 2016

Bug Report

  • TSLint version: 3.8.1
  • TypeScript version: 1.8.2
  • Running TSLint via: gulp-tslint

with tslint.json as json object:

{
  "extends": "my-other-tslint.json",
  "rules": {
    "no-internal-module": false
  }
}

Actual behavior

ignores rules in my-other-tslint.json

Expected behavior

applies rules in my-other-tslint.json

@jkillian
Copy link
Contributor

jkillian commented Apr 28, 2016

When you pass in a configuration as an object, TSLint has no way to determine "where it comes from." In other words, what is the relative path "my-other-tslint.json" actually relative to? So for this reason it doesn't do anything with the extends value you provided.

However, I suppose we could always resolve it relative to the process's current working directory? In your case, that's the behavior that would make things work as expected for you, right?

I think #1172 especially and #1168 also will put us in a better position to do this, once they merge we'll take care of this!

@sixinli
Copy link
Author

sixinli commented Apr 28, 2016

That sounds reasonable. Supporting absolute path would also be good. Relative paths could be confusing some things, it would be nice to be able to resolve them all before passing them into tslint.

Thanks,
Sixin

@datatypevoid
Copy link

Has any progress been made on this since the last post?

@JoshuaKGoldberg
Copy link
Contributor

@datatypevoid nope, no progress. Accepting PRs though! 😊

@JoshuaKGoldberg
Copy link
Contributor

☠️ TSLint's time has come! ☠️

TSLint is no longer accepting most feature requests per #4534. See typescript-eslint.io for the new, shiny way to lint your TypeScript code with ESLint. ✨

It was a pleasure open sourcing with you all!

@JoshuaKGoldberg
Copy link
Contributor

🤖 Beep boop! 👉 TSLint is deprecated 👈 (#4534) and you should switch to typescript-eslint! 🤖

🔒 This issue is being locked to prevent further unnecessary discussions. Thank you! 👋

@palantir palantir locked and limited conversation to collaborators Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants