Thanks to visit codestin.com
Credit goes to github.com

Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Changes to configurations for 6.0.0 #5900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JoshuaKGoldberg opened this issue Oct 29, 2022 · 1 comment
Closed

Changes to configurations for 6.0.0 #5900

JoshuaKGoldberg opened this issue Oct 29, 2022 · 1 comment
Assignees
Labels
breaking change This change will require a new major version to be released package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin recommended-rules Discussion about recommended rule sets triage Waiting for team members to take a look
Milestone

Comments

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Oct 29, 2022

Similar to what @bradzacher did for 5.0.0 (in #3746), I'm going to put forward the new recommended set ahead of time.

I'm looking for feedback from the community before we go ahead and make the changes.

Note 11/14: I'm going to turn this into a discussion later this week, then share around more. πŸ˜‡

Table Key

Column Description Emojis
Status Being added, deprecated, or removed
  • πŸ†• = newly added to TypeScript-ESLint
  • πŸ™… = deprecated in the next major
  • βž–οΈ = to be removed from the plugin in the next version
Ext Extension rule?
  • β˜‘οΈ = yes
R Recommended
  • βž• = add to recommended this version
  • ⚠️ = recommended as warning
  • πŸ›‘ = recommended as an error
  • βž–οΈ = remove from recommended this version
RWT Recommended-requiring-type-checking
  • βž• = add to recommended-with-typechecking this version
  • ⚠️ = recommended as warning
  • πŸ›‘ = recommended as an error
  • βž–οΈ = remove from recommended this version
Strict Strict
  • βž• = add to strict this version
  • ⚠️ = recommended as warning
  • βž–οΈ = remove from strict this version

Recommendations Table

Hint: search for πŸ†• to find newly added rules, and βž• or βž– to see config changes.

Rule Status Ext R RWT Strict Comment
adjacent-overload-signatures πŸ›‘
array-type ⚠️ move to stylistic (#5964)?
await-thenable πŸ›‘ #5946
ban-ts-comment πŸ›‘
ban-tslint-comment ⚠️
ban-types πŸ›‘ #5947
brace-style β˜‘οΈ layout πŸ’©
class-literal-property-style ⚠️ move to stylistic (#5964)?
comma-dangle β˜‘οΈ layout πŸ’©
comma-spacing β˜‘οΈ layout πŸ’©
consistent-generic-constructors πŸ†• ⚠️ move to stylistic (#5964)?
consistent-indexed-object-style ⚠️ move to stylistic (#5964)?
consistent-type-assertions βž•πŸ›‘ βž–βš οΈ
consistent-type-definitions ⚠️ move to stylistic (#5964)?
consistent-type-exports πŸ†• too opinionated for any config
consistent-type-imports too opinionated for any config
default-param-last β˜‘οΈ
dot-notation β˜‘οΈ ⚠️ move to stylistic (#5964)?
explicit-function-return-type too opinionated for any config
explicit-member-accessibility too opinionated for any config
explicit-module-boundary-types too opinionated for any config
func-call-spacing β˜‘οΈ layout πŸ’©
indent β˜‘οΈ layout πŸ’©
init-declarations β˜‘οΈ
keyword-spacing β˜‘οΈ layout πŸ’©
lines-between-class-members β˜‘οΈ layout πŸ’©
member-delimiter-style layout πŸ’©
member-ordering too opinionated for any config
method-signature-style too opinionated for any config
naming-convention too opinionated for any config
no-array-constructor β˜‘οΈ πŸ›‘
no-base-to-string βž•πŸ›‘ βž–βš οΈ required #4999
no-confusing-non-null-assertion ⚠️ move to stylistic (#5964)?
no-confusing-void-expression βž•βš οΈ
no-dupe-class-members β˜‘οΈ
no-duplicate-enum-values πŸ†• βž•πŸ›‘ ⚠️
no-duplicate-imports πŸ™… delete (##5973)?
no-dynamic-delete ⚠️ too opinionated for recommended
no-empty-function β˜‘οΈ πŸ›‘ move to stylistic (#5964)?
no-empty-interface πŸ›‘ move to stylistic (#5964)?
no-explicit-any πŸ›‘
no-extra-non-null-assertion πŸ›‘
no-extra-parens β˜‘οΈ layout πŸ’©
no-extra-semi β˜‘οΈ πŸ›‘ is this layout πŸ’©? move to stylistic (#5964)?
no-extraneous-class ⚠️
no-floating-promises πŸ›‘
no-for-in-array πŸ›‘
no-implicit-any-catch πŸ†• delete (##5973)?
no-implied-eval β˜‘οΈ πŸ›‘
no-inferrable-types πŸ›‘
no-invalid-this β˜‘οΈ
no-invalid-void-type ⚠️
no-loop-func β˜‘οΈ
no-loss-of-precision β˜‘οΈ πŸ›‘
no-magic-numbers β˜‘οΈ
no-meaningless-void-operator ⚠️
no-misused-new πŸ›‘
no-misused-promises πŸ›‘
no-namespace πŸ›‘
no-non-null-asserted-nullish-coalescing ⚠️
no-non-null-asserted-optional-chain πŸ›‘
no-non-null-assertion πŸ›‘ move to strict (#5959)?
no-parameter-properties πŸ™… delete (##5973)?
no-redeclare β˜‘οΈ
no-redundant-type-constituents πŸ†• βž•πŸ›‘
no-require-imports
no-restricted-imports β˜‘οΈ
no-shadow β˜‘οΈ
no-this-alias πŸ›‘
no-throw-literal β˜‘οΈ ⚠️
no-type-alias
no-unnecessary-boolean-literal-compare ⚠️
no-unnecessary-condition ⚠️
no-unnecessary-qualifier
no-unnecessary-type-arguments ⚠️
no-unnecessary-type-assertion πŸ›‘
no-unnecessary-type-constraint πŸ›‘
no-unsafe-argument πŸ›‘
no-unsafe-assignment πŸ›‘
no-unsafe-call πŸ›‘
no-unsafe-declaration-merging πŸ†• βž•πŸ›‘ βž–βš οΈ
no-unsafe-member-access πŸ›‘
no-unsafe-return πŸ›‘
no-unused-expressions β˜‘οΈ
no-unused-vars β˜‘οΈ πŸ›‘
no-use-before-define β˜‘οΈ
no-useless-constructor β˜‘οΈ ⚠️
no-useless-empty-export πŸ†• βž•πŸ›‘
no-var-requires πŸ›‘
non-nullable-type-assertion-style ⚠️
object-curly-spacing β˜‘οΈ layout πŸ’©
padding-line-between-statements β˜‘οΈ layout πŸ’©
parameter-properties πŸ†• too opinionated for any config
prefer-as-const πŸ›‘
prefer-enum-initializers
prefer-for-of ⚠️
prefer-function-type ⚠️
prefer-includes ⚠️
prefer-literal-enum-member ⚠️
prefer-namespace-keyword πŸ›‘
prefer-nullish-coalescing ⚠️ Options: set ignoreTernaryTests to false by default
prefer-optional-chain ⚠️
prefer-readonly
prefer-readonly-parameter-types
prefer-reduce-type-parameter ⚠️
prefer-regexp-exec
prefer-return-this-type ⚠️
prefer-string-starts-ends-with ⚠️
prefer-ts-expect-error ⚠️
promise-function-async
quotes β˜‘οΈ layout πŸ’©
require-array-sort-compare
require-await β˜‘οΈ πŸ›‘
restrict-plus-operands βž–πŸ›‘ βž•βš οΈ too opinionated for recommended
restrict-template-expressions πŸ›‘
return-await β˜‘οΈ
semi β˜‘οΈ layout πŸ’©
sort-type-constituents πŸ†• move to stylistic (#5964)?
sort-type-union-intersection-members πŸ™… delete (##5973)?
space-before-blocks πŸ†• β˜‘οΈ layout πŸ’©
space-before-function-paren β˜‘οΈ layout πŸ’©
space-infix-ops β˜‘οΈ layout πŸ’©
strict-boolean-expressions
switch-exhaustiveness-check
triple-slash-reference πŸ›‘
type-annotation-spacing layout πŸ’©
typedef
unbound-method πŸ›‘
unified-signatures ⚠️
@JoshuaKGoldberg JoshuaKGoldberg added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look breaking change This change will require a new major version to be released recommended-rules Discussion about recommended rule sets labels Oct 29, 2022
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Oct 29, 2022
@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.0.0 milestone Oct 30, 2022
@JoshuaKGoldberg JoshuaKGoldberg changed the title Changes to the recommended sets for 6.0.0 Changes to configurations for 6.0.0 Nov 12, 2022
@bradzacher
Copy link
Member

| consistent-type-assertions | R: βž•πŸ›‘ |
consistent-type-assertions is a stylistic rule - some rare people would be okay using angle-bracket assertions.
It was removed from the recommended set in v3.0.0 - #1423


| no-duplicate-enum-values | R: βž•πŸ›‘ |

I think this is a good style to enforce and most of the time having a duplicate is a bug.
I think explicitly using an eslint-disable to document that the value is intentionally duplicated is a good thing for code quality.


| no-redundant-type-constituents | R: βž•πŸ›‘ |

Some codebases do use redundant constituents as a way of documenting possible values.
These usecases are pretty rare though, I think?
So we're probably good to turn this on.
It should catch more errors than it does flag "intentional" redundant code.


| restrict-plus-operands | R: βž–πŸ›‘ | too opinionated for recommended |

This rule was explicitly added to the recommended set in v3.0.0 - #1423
Why do you say that it's too opinionated?


πŸ‘ LGTM - no comment

βž•πŸ›‘

  • no-useless-empty-export
  • no-base-to-string
  • no-redundant-type-constituents
  • no-unsafe-declaration-merging

@typescript-eslint typescript-eslint locked and limited conversation to collaborators Nov 17, 2022
@JoshuaKGoldberg JoshuaKGoldberg converted this issue into discussion #6014 Nov 17, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
breaking change This change will require a new major version to be released package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin recommended-rules Discussion about recommended rule sets triage Waiting for team members to take a look
Projects
None yet
Development

No branches or pull requests

2 participants