-
Notifications
You must be signed in to change notification settings - Fork 36
Conversation
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.
It's a good practice to add CHANGELOG.md
to the repository. We can add it later in a separated commit just before release.
"Konstantin Ikonnikov <ikokostya@gmail.com>" | ||
], | ||
"peerDependencies": { | ||
"eslint": "^5.8.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.
Dependency from eslint
is redundant. Instead, this package must depend from tslint
. I suggest use the following versions (or greater):
├── tslint@5.7.0
└── tslint-eslint-rules@4.1.1
## Installation | ||
|
||
``` | ||
npm install --save-dev tslint tslint-config-loris |
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.
Because package includes tslint-eslint-rules
as peer dependency, it must be presented here (npm
doesn't install peer dependency automatically since v3
).
'variable-name': [true, 'ban-keywords'], | ||
'eofline': true, | ||
// TODO(ikokostya): Find easy way to disable rules in subdirectory. | ||
'ter-indent': false, // [true, 4, {SwitchCase: 1}], |
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 disabled this rule, because it got false positive results. I try enable this rule again now and it works as expected for the following versions:
├── tslint@5.7.0
└── tslint-eslint-rules@4.1.1
So, I suggest to enable it.
'triple-equals': true, | ||
'no-arg': true, | ||
// Disable this rule, because it isn't configurable | ||
// https://github.com/palantir/tslint/issues/1088 |
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.
First issue can be removed, because since tslint v5.5
this rule has option for empty catch blocks:
'no-empty': [true, 'allow-empty-catch']
@@ -0,0 +1,115 @@ | |||
module.exports = { | |||
// Add additional rules from https://github.com/buzinas/tslint-eslint-rules | |||
'rulesDirectory': 'node_modules/tslint-eslint-rules/dist/rules', |
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.
- 'rulesDirectory': 'node_modules/tslint-eslint-rules/dist/rules',
+ 'extends': 'tslint-eslint-rules',
See https://github.com/buzinas/tslint-eslint-rules#configure-tslint-to-use-tslint-eslint-rules
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 am wrong. buzinas/tslint-eslint-rules#214 (comment)extends
includes all rules with all default values. Current solution is right.
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 decided to leave rulesDirectory
property as safe by default (it will not enable any rules), but specify only name of npm module instead of pull path.
'no-constant-condition': [true, {checkLoops: false}], | ||
'no-control-regex': true, | ||
'no-debugger': true, | ||
'no-duplicate-case': true, |
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 rule was added in tslint 5.8.0
: no-duplicate-switch-case
'no-duplicate-case': true, | ||
'no-empty-character-class': true, | ||
'no-ex-assign': true, | ||
'no-extra-semi': true, |
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.
Looks like this rule is covered by semicolon rule from tslint
, which is used below.
'no-unexpected-multiline': true, | ||
'no-unsafe-finally': true, | ||
'use-isnan': true, | ||
'valid-typeof': true, |
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 rule is covered by typeof-compare rule from tslint
. But it's deprecated in tslint 5.8.0
. We can remove 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.
Can you add link to this package from root README.md
?
It's not uploaded yet. |
@dmikis any news? |
@dmikis Please take a look new changes. |
I can't approve the PR cause I'm the author:) If there's no objections, let's merge it. |
🆒 |
#92