-
Notifications
You must be signed in to change notification settings - Fork 888
Blog entry for 4.0 #1734
Blog entry for 4.0 #1734
Conversation
@@ -0,0 +1,58 @@ | |||
--- | |||
layout: post | |||
title: "New for 4.0" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might help, not sure it's exhaustive
- no-duplicate-key - Deprecate
no-duplicate-key
rule (covered by compiler) #885 - no-unreachable - deprecate no-unreachable once implemented in TS compiler #661
- no-unused-variable - Start to deprecate no-unused-variable rule #1481
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
looks good! |
fixes #1663