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

--print-config flag #4744

Merged
merged 10 commits into from Jun 3, 2019
Merged

--print-config flag #4744

merged 10 commits into from Jun 3, 2019

Conversation

JoshuaKGoldberg
Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg commented May 25, 2019

PR checklist

Overview of change:

Adds a --print-config flag as suggested in #3720. It's roughly equivalent to ESLint's: it takes in a file name and prints the JSON result of parsing the configuration that would be used for that file.

Is there anything you'd like reviewers to focus on?

Where should I add tests for the output of this? I could only find precedent for testing the exit code. 😕

Cleaned up src/runner.ts a bit to help keep things organized. See first 3 commits in order for a more logical flow of the changes.

Edit: managed to bust my local install of TSLint; fixing lint rules now... 😂 RC and Next lint failures are unrelated: #4745

CHANGELOG.md entry:

[enhancement]: Added --print-config CLI flag

Josh Goldberg added 3 commits May 25, 2019 16:04
…s.ts

src/runner.ts is getting pretty overcrowded; it was getting hard to reason about where things belonged in it.
Relies on some slightly manual stringification of members of the config files.
Haven't figured out yet how to test the real output :(
Josh Goldberg and others added 2 commits May 25, 2019 16:18
Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

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

I will fix the next / RC failures today

src/configuration.ts Show resolved Hide resolved
src/runner.ts Outdated Show resolved Hide resolved
src/runner.ts Outdated Show resolved Hide resolved
src/files/finding.ts Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: --print-config flag like eslint
2 participants