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

Blog entry for 4.0 #1734

Merged
merged 4 commits into from
Nov 18, 2016
Merged

Blog entry for 4.0 #1734

merged 4 commits into from
Nov 18, 2016

Conversation

nchen63
Copy link
Contributor

@nchen63 nchen63 commented Nov 17, 2016

fixes #1663

@@ -0,0 +1,58 @@
---
layout: post
title: "New for 4.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

I might call this "TSLint 4.0 Released", but up to you

* [cyclomatic-complexity][24]

[0]: https://github.com/palantir/tslint/releases
[1]: https://github.com/palantir/tslint/blob/master/CHANGELOG.md
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe link to release instead of the changelog?

---

TSLint [4.0][0] has been released! With this release comes a few exciting [changes][1]. Some of the highlights:
* **Fixers** - Do you dread turning on a new rule because of all of the new errors? For some of the most common issues, we'll fix them for you. To use this feature, run `tslint` with the `--fix` option. Here are the rules we fix right now:
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of "rules we fix" might say "rules that support --fix" or something

* [semicolon][7]
* [trailing-comma][8]
* **Linting `.js` files** - Make migrating from JavaScript even easier! Just add a `jsRules` [section][9] to your `tslint.json` file.
* **TypeScript 2.0+ required** - This lets us deprecate/remove rules that are checked by the compiler.
Copy link
Contributor

Choose a reason for hiding this comment

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

might be worth detailing which compiler features?

Copy link
Contributor

@olore olore Nov 17, 2016

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@olore thanks!

---

TSLint [4.0][0] has been released! With this release comes a few exciting [changes][1]. Some of the highlights:
* **Fixers** - Do you dread turning on a new rule because of all of the new errors? For some of the most common issues, we'll fix them for you. To use this feature, run `tslint` with the `--fix` option. Here are the rules we fix right now:
Copy link
Contributor

Choose a reason for hiding this comment

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

can you also write about & provide examples of how to implement a fixer (perhaps suggest that it's easy) to encourage contributions?

* [ordered-imports][6]
* [semicolon][7]
* [trailing-comma][8]
* **Linting `.js` files** - Make migrating from JavaScript even easier! Just add a `jsRules` [section][9] to your `tslint.json` file.
Copy link
Contributor

Choose a reason for hiding this comment

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

this isn't exactly the purpose... the purpose here is so that users don't have to use two linters (if they are considering tslint while migrating, they almost certainly were using eslint before). also note that it was a highly requested community feature (we didn't drive it)

Copy link
Contributor

Choose a reason for hiding this comment

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

I've wondered how jsRules fits in. Is it only for React? I don't know why I think that. Is there something written up about it?

I know there is https://github.com/buzinas/tslint-eslint-rules, maybe we reference that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I looked at the original ticket, and migrating was one of the reasons given. Can change the text, though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@olore jsRules is another set of rules (from the same general pool of TSLint rules) that runs on .js files. Previously, TSLint would just error when given a .js file. Since JavaScript is a subset of TypeScript, some of the same rules can be applied to them

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks @nchen63

* [trailing-comma][8]
* **Linting `.js` files** - Make migrating from JavaScript even easier! Just add a `jsRules` [section][9] to your `tslint.json` file.
* **TypeScript 2.0+ required** - This lets us deprecate/remove rules that are checked by the compiler.
* **API Change** - [Moved and renamed][11] some things to make more sense.
Copy link
Contributor

Choose a reason for hiding this comment

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

can you clarify that this is the Node.js API and the imports, in particular, are simpler

@adidahiya
Copy link
Contributor

looks good!

@adidahiya adidahiya merged commit 3c585bf into master Nov 18, 2016
@adidahiya adidahiya deleted the blog-4.0 branch November 18, 2016 16:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to use applyFixes
4 participants