-
Notifications
You must be signed in to change notification settings - Fork 0
Update in preparation for v6 #15
Conversation
@@ -43,8 +43,8 @@ module.exports = { | |||
// Don't allow unused labels. | |||
'no-unused-labels': 'off', | |||
|
|||
// Disallow the 'var' keyword. | |||
'no-var': 'error', |
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.
no-var
is now included in the Standard config.
@@ -55,59 +55,6 @@ module.exports = { | |||
// Require the radix argument to parseInt to avoid unintentionally allowing hex or octal. | |||
radix: 'error', | |||
|
|||
// Naming conventions. The TypeScript rule is much more complete and configurable than ESLint's. | |||
camelcase: 'off', | |||
'@typescript-eslint/naming-convention': [ |
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.
@typescript-eslint/naming-convention
now requires type information, which means it can only be run on TypeScript files. I've moved it below. camelcase
will still apply to JS files.
@@ -156,6 +103,7 @@ module.exports = { | |||
'react/jsx-handler-names': 'off', | |||
|
|||
// We use TypeScript so don't usually need PropTypes. | |||
'react/no-unused-prop-types': 'off', |
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 was flagging false positives in some TypeScript code.
@@ -311,13 +318,6 @@ module.exports = { | |||
'no-array-constructor': 'off', | |||
'@typescript-eslint/no-array-constructor': 'error', | |||
|
|||
// Don't allow extra semi-colons. | |||
'no-extra-semi': 'off', |
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 is covered by Prettier, and conflicts with some of Prettier's opinions.
@@ -276,12 +283,6 @@ module.exports = { | |||
{ assertionStyle: 'as' }, | |||
], | |||
|
|||
// Prefer interfaces over type literals (type T = { ... }). | |||
'@typescript-eslint/consistent-type-definitions': [ |
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 turns out that interfaces and type literals are not completely equivalent, and there are use cases for type literals over interfaces. This rule does not account for those use cases.
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.
lgtm 👍
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.
Nice! LGTM!!
No major changes in this release, but some rules did change, so it will be a new major version. The primary goal here is to get in the newest major version of
@typescript-eslint
packages.Changes: