This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 888
[Feature Request]: --print-config flag like eslint #3720
Comments
Related: summary request at #2267. Perhaps these two could be accomplished together? Perhaps they shouldn't be? |
JoshuaKGoldberg
added
Status: Accepting PRs
and removed
Status: In Discussion
Status: Needs Proposal
labels
May 25, 2019
Given the upcoming migration to ESLint (#4534), this seems like it would be a very useful configuration flag to help with migrating to typescript-eslint. Marking as accepting PRs! 🎉 Since nobody piped up with an alternate proposal (
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm not using the issue template because I'm not reporting a bug and all the fields appear to relate to bug reporting. Please let me know if I can provide any other information.
Description
It would be great to have a way to audit the rules being applied to a given file or project, as eslint does with
--print-config [FILENAME]
. I've currently got a number ofextends
in my tslint.json and I'm getting unexpected results; being able to print the config would help. Ideally something like:With the result being a simple JSON configuration of the evaluated set of rules.
Implementation
It looks like it might be pretty easy to accomplish, if I understand the library usage example properly—it seems like you'd just have to pretty-format the object returned by this command (assuming
commandLineConfigArg?: string
andcommandLineFileArg: string
were supplied through the command line):Is that a reasonable approach? In experimenting, I'm getting a pretty short set of rules compared to my eslint output on another project, so I might be missing something—ah it looks like the eslint output includes a lot of "off" rules, so I don't know how this flag might account for that. But if I understand the above line correctly, then in the short term I think I can just
npx node
and run these commands myself in a node console, but I think this would be a useful flag and help to align this tool with its ES analog.The text was updated successfully, but these errors were encountered: