Skip to content

Commit f1bd492

Browse files
Merge branch 'master' into feature/opt-in-flag-convert-disable-comments
2 parents dd319f8 + 2fc7a7e commit f1bd492

20 files changed

+6102
-4985
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ references:
99
jobs:
1010
build:
1111
docker:
12-
- image: circleci/node:8
12+
- image: circleci/node:10
1313

1414
working_directory: ~/repo
1515

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,29 @@ module.exports = {
2020
rules: {
2121
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
2222
"@typescript-eslint/explicit-function-return-type": "off",
23+
"@typescript-eslint/explicit-module-boundary-types": "off",
2324
"@typescript-eslint/generic-type-naming": "off",
25+
"@typescript-eslint/method-signature-style": "off",
2426
"@typescript-eslint/no-explicit-any": "off",
2527
"@typescript-eslint/no-magic-numbers": "off",
2628
"@typescript-eslint/no-parameter-properties": "off",
2729
"@typescript-eslint/no-type-alias": "off",
30+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
2831
"@typescript-eslint/no-unnecessary-condition": "off",
32+
"@typescript-eslint/no-unsafe-assignment": "off",
33+
"@typescript-eslint/no-unsafe-call": "off",
34+
"@typescript-eslint/no-unsafe-member-acces": "off",
35+
"@typescript-eslint/no-unsafe-member-access": "off",
36+
"@typescript-eslint/no-unsafe-return": "off",
2937
"@typescript-eslint/no-untyped-public-signature": "off",
3038
"@typescript-eslint/no-use-before-define": "off",
39+
"@typescript-eslint/prefer-readonly-parameter-types": "off",
40+
"@typescript-eslint/prefer-reduce-type-parameter": "off",
3141
"@typescript-eslint/require-await": "off",
3242
"@typescript-eslint/restrict-template-expressions": "off",
3343
"@typescript-eslint/return-await": "off",
3444
"@typescript-eslint/strict-boolean-expressions": "off",
45+
"@typescript-eslint/switch-exhaustiveness-check": "off",
3546
"@typescript-eslint/typedef": "off",
3647
"no-else-return": "error",
3748
},

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
Converts your TSLint configuration to the closest reasonable ESLint equivalent.
1212

13-
👉 Did you know [TSLint is being deprecated this year](https://github.com/palantir/tslint/issues/4534)?
13+
👉 Did you know [TSLint is deprecated](https://github.com/palantir/tslint/issues/4534)?
1414
Hooray!
1515
Use `tslint-to-eslint-config` to expedite migrating your project onto ESLint.
1616

@@ -34,6 +34,10 @@ TSLint rules without ESLint equivalents will be wrapped with [eslint-plugin-tsli
3434

3535
> Requires Node 10+ (LTS) and TSLint 5.18+
3636
37+
### FAQs
38+
39+
We **strongly** advise reading [docs/FAQs.md](./docs/FAQs.md) before planning your conversion from ESLint to TSLint.
40+
3741
### CLI Flags
3842

3943
Each of these flags is optional:

docs/FAQs.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Frequently Asked Questions
2+
3+
## Should I Migrate from TSLint to ESLint?
4+
5+
**Yes**.
6+
7+
[TSLint is deprecated](https://medium.com/palantir/tslint-in-2019-1a144c2317a9) and will [only receive patches](https://github.com/palantir/tslint/issues/4534) for security vulnerabilities and breaking TypeScript changes.
8+
Even if it still works on your project, it will become less useful over time as TypeScript evolves.
9+
10+
## Should I Use `tslint-to-eslint-config`?
11+
12+
`tslint-to-eslint-config` is recommended for use if you require near-identical behavior in transitioning from TSLint to ESLint.
13+
This is most reasonable when your project is large enough that fixing for different linter rules would be a significant time investment.
14+
15+
However, after -or even better, _before_- you're migrated to ESLint, we recommend you take this opportunity to re-evaluate your core lint rules.
16+
TSLint's recommendations were solidified several core TypeScript versions ago and don't always reflect the latest and greatest standards and lint rules.
17+
18+
Our recommended TSLint-to-ESLint configuration migration approach is:
19+
20+
1. Run `tslint-to-eslint-config` on your project
21+
2. [Disable complaints on a line-, file-, or rule basis](https://eslint.org/docs/user-guide/configuring) for any rules you do not want to enable and/or are now giving complaints
22+
3. Switch your configuration to extend from [typescript-eslint's `recommended` and `recommend-requiring-type-checking` rulesets](https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/README.md)
23+
4. Repeat step 2
24+
5. Add any [community plugins](https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/README.md#plugins) relevant to your project, then repeat step 2
25+
26+
> 😉 Consider filing granular tickets to track investigating re-enabling disabled lint rules to make sure the work doesn't get forgotten.
27+
28+
## Should I Use Prettier?
29+
30+
**Yes!**
31+
32+
Formatting responsibilities, such as indentation and line wrapping, are exceedingly difficult to get implement in **linters**, and as such are practically impossible to get correct in them.
33+
**Formatters** such as [Prettier](https://prettier.io) do a [much better job](https://prettier.io/docs/en/why-prettier.html) of formatting your code.
34+
See [this issue](https://github.com/typescript-eslint/typescript-eslint/issues/1824) for more explanation.
35+
36+
The maintenance teams at both TSLint and typescript-eslint recommend using a formatter such as Prettier to format your code instead of a linter.
37+
38+
Please do it. Now. Please stop using code style rules. Please use prettier. Code style rules are hard to write and maintain. Rules like indent are thousands of he comes he comes do not fi​ght he com̡e̶s, ̕h̵i​s un̨ho͞ly radiańcé destro҉ying all enli̍̈́̂̈́ghtenment, spaces and brackets lea͠ki̧n͘g fr̶ǫm ̡yo​͟ur eye͢s̸ ̛l̕ik͏e liq​uid pain, the song of indentation calculation will exti​nguish the voices of mor​tal man from the sp​here I can see it can you see ̲͚̖͔̙î̩́t̲͎̩̱͔́̋̀ it is beautiful t​he final snuffing of the lie​s of Man ALL IS LOŚ͖̩͇̗̪̏̈́T ALL I​S LOST the pon̷y he comes he c̶̮omes he comes the ich​or permeates all MY FACE MY FACE ᵒh god no NO NOO̼O​O NΘ stop the an​*̶͑̾̾​̅ͫ͏̙̤g͇̫͛͆̾ͫ̑͆l͖͉̗̩̳̟̍ͫͥͨe̠̅s ͎a̧͈͖r̽̾̈́͒͑e n​ot rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆ ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ.
39+
40+
> 🙏 [eslint-plugin-prettier](https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/README.md#usage-with-prettier) is an excellent ESLint plugin that disables formatting rules from your configuration.
41+
> Please use it. 🙏

0 commit comments

Comments
 (0)