Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make trivia/whitespace (Prettier) rules opt-out #302

Closed
JoshuaKGoldberg opened this issue Dec 22, 2019 · 2 comments · Fixed by #412
Closed

Make trivia/whitespace (Prettier) rules opt-out #302

JoshuaKGoldberg opened this issue Dec 22, 2019 · 2 comments · Fixed by #412
Assignees
Labels
status: accepting prs Please, send in a PR to resolve this! ✨ type: enhancement New feature or request

Comments

@JoshuaKGoldberg
Copy link
Member

🚀 Feature Request

Following #2 and #301, I really want to harp on the opinion that a linter (ESLint) should be separate from the formatter (Prettier). Having folks need to opt-in with a CLI flag in order to get that behavior will further that cause.

Existing Behavior

Right now, all existing TSLint rules will be output to the ESLint output - even Prettier-related ones such as whitespace.

Change Proposal

If a rule is disabled by tslint-config-prettier, it should only be output if a new CLI flag is provided.

@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Please, send in a PR to resolve this! ✨ type: enhancement New feature or request labels Dec 22, 2019
@JoshuaKGoldberg JoshuaKGoldberg added this to the 1.0 Ready 🚀 milestone Dec 22, 2019
@KingDarBoja
Copy link
Collaborator

Not an expert on the topic, but maybe InquirerJS would help to accomplish that.

@JoshuaKGoldberg
Copy link
Member Author

Hmm, I've thought about this a bit, and I think it'd be better not to surprise users with a change in their configuration. #412's first commit e92888c makes this behavior default with an --ugly opt-out. We (linter aficionados) might prefer that but there's a case for users who can't or don't use Prettier getting surprised and irritated by it.

Instead, let's switch to a --prettier CLI option as a utility.

@JoshuaKGoldberg JoshuaKGoldberg changed the title Make trivia/whitespace (Prettier) rules opt-in Make trivia/whitespace (Prettier) rules opt-out Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send in a PR to resolve this! ✨ type: enhancement New feature or request
Projects
None yet
2 participants