You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
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 of extends in my tslint.json and I'm getting unexpected results; being able to print the config would help. Ideally something like:
$ tslint --print-config path/to/file.ts
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 and commandLineFileArg: 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:
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 (☹️), let's keep this as similar to ESLint's --print-config as possible. It should directly print out the JSON equivalent of whatever configuration is found for a single file.
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: