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

Feature: Introduce new rule: newline-before-throw #4380

Closed
wants to merge 2 commits into from

Conversation

ovr
Copy link

@ovr ovr commented Dec 13, 2018

Hey!

PR checklist

  • Addresses an existing issue: #0000
  • New feature
    • Includes tests
  • Documentation update

Overview of change:

New rule 😸

CHANGELOG.md entry:

[new-rule] newline-before-throw

Thanks

@palantirtech
Copy link
Member

Thanks for your interest in palantir/tslint, @ovr! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@ovr ovr force-pushed the newline-before-throw branch 3 times, most recently from 50e9cbf to 600f81f Compare December 13, 2018 05:54
@ericanderson
Copy link
Member

I do not think that the job of tslint is to enforce code formatting standards and am personally questioning if any such rules should exist as the core part of tslint. There is likely a need for a tslint-contrib that is more openly/publicly maintained.

I'm going to hold this PR for a bit while we figure out a written policy for which types of rules will be a part of tslint out of the box.

Copy link
Member

@ericanderson ericanderson left a comment

Choose a reason for hiding this comment

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

Marking a request changes to prevent merge while we figure out policy of rules.

@ovr
Copy link
Author

ovr commented Dec 14, 2018

I do not think that the job of tslint is to enforce code formatting standards and am personally questioning if any such rules should exist as the core part of tslint.

  1. From README:

TSLint is an extensible static analysis tool that checks TypeScript code for readability, maintainability, and functionality errors.

readability

  1. A lot of users use tslint instead of eslint, to be honestly it awful to use tslint only for static analys and eslint for (readability/code formatting)

while we figure out a written policy for which types of rules will be a part of tslint out of the box.

👍

Thanks

@VincentLanglet
Copy link
Contributor

This rules seems as logic as the "newline before return" rules already implemented.

And as a typescript user, I expect from tslint to check as good my ts code that eslint do for my js.
This rules exist in the core part of eslint so why not tslint ?

@adidahiya adidahiya added the Formatting rule Relates to a rule which enforces code formatting and likely overlaps with prettier label Jan 29, 2019
@VincentLanglet
Copy link
Contributor

@ericanderson @JoshuaKGoldberg @adidahiya Some months since the PR is created and ready to merge.

This is labelled as "In discussion", can we help about it ?

@adidahiya
Copy link
Contributor

@VincentLanglet @ovr sorry for the delay here, but as per #4534 and #3592, I am inclined to close this PR and avoid adding new formatting rules to core TSLint. This new rule can happily live in a community rule set outside of this repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Formatting rule Relates to a rule which enforces code formatting and likely overlaps with prettier Resolution: Declined
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants