-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Changes to the recommended
sets for 5.0.0
#3746
Comments
I would prefer
Also consider issues such as #3145 and the rule can be quite annoying. The recommended list should be reserved for rules that are overwhelmingly more useful than annoying, and I dont think this rule makes the cut. |
@bradzacher to clarify, this is for |
recommended
sets for 4.0.0recommended
sets for 5.0.0
@joealden - ooops, thanks for that. We didn't change the sets in 4.0 so when I copy pasted my old issue from 3.0 I just incremented the version instead of thinking 🤦 @pgsandstrom perhaps we should instead add a new option to ignore function parameters and set it as the default - would that address your concerns with it being recommended? |
I think that would improve the rule, but my personal opinion is still that the value it provides is a bit too opinionated and limited to be part of the recommended set. |
To put in my 2 cents regarding Regarding a rule that is semi-related to I'm not saying that I think we should 100% remove this rule for the recommended preset, but in my experience, I turn it off most of the time, so I'm wondering what others think regarding this rule. |
+1 to this, I don't think I've ever enabled that rule. |
I also always turn off |
For me the point of the First - readability. It means you don't have to rely on intellisense to figure out what a function is or does. This makes it easier to do reviews without an IDE. Code is read more times than it's written so IMO optimising for readability is paramount. Second - it allows you to catch problems sooner. In some projects this is fine because you always have a webpack build in watch mode or something, but in others you have no build and must manually run But I understand that some people find it cumbersome. I disagree with it personally, but I understand that some people like to heavily lean on the checker's inference. This is one of the ways in which flow is better than TS (IMO). Flow has a mode called types-first which enables significant performance improvements by only analysing the types of a dependency's exports. For types-first you have to annotate the boundary, and it's a hard compiler error if you don't. But at this point it's pretty clear that this is a divisive topic and nobody agrees on it. Without some perf improvement from TS - it's not worth pushing the style - especially as there are so many people that are against it / turn it off. |
@bradzacher This one can be closes as #3809 & #3818 are merged |
Similar to what I did for 3.0.0 (in #1423), I'm putting forward the new recommended set ahead of time.
I'm looking for feedback from the community before we go ahead and make the changes.
Hint: search for the text
(new)
to find the changesHeader Key
adjacent‑overload‑signatures
array‑type
await‑thenable
ban‑ts‑comment
ban‑tslint‑comment
ban‑types
object
from the default config, because enough people want to use it and disagree with the reasoning.brace‑style
class‑literal‑property‑style
comma‑dangle
comma‑spacing
consistent‑indexed‑object‑style
consistent‑type‑assertions
consistent‑type‑definitions
consistent‑type‑imports
default‑param‑last
dot‑notation
explicit‑function‑return‑type
explicit‑member‑accessibility
explicit‑module‑boundary‑types
func‑call‑spacing
indent
init‑declarations
keyword‑spacing
lines‑between‑class‑members
member‑delimiter‑style
member‑ordering
method‑signature‑style
naming‑convention
no‑array‑constructor
no‑base‑to‑string
no‑confusing‑non‑null‑assertion
no‑confusing‑void‑expression
no‑dupe‑class‑members
no‑duplicate‑imports
no‑dynamic‑delete
no‑empty‑function
no‑empty‑interface
no‑explicit‑any
no‑extra‑non‑null‑assertion
no‑extra‑parens
no‑extra‑semi
no‑extraneous‑class
no‑floating‑promises
no‑for‑in‑array
no‑implicit‑any‑catch
no‑implied‑eval
no‑inferrable‑types
no‑invalid‑this
no‑invalid‑void‑type
no‑loop‑func
no‑loss‑of‑precision
no‑magic‑numbers
no‑misused‑new
no‑misused‑promises
no‑namespace
no‑non‑null‑asserted‑optional‑chain
no‑non‑null‑assertion
no‑parameter‑properties
no‑redeclare
eslint-recommended
set.no‑require‑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-*
rules.no‑unsafe‑assignment
no‑unsafe‑call
no‑unsafe‑member‑access
no‑unsafe‑return
no‑unused‑expressions
no‑unused‑vars‑experimental
no‑unused‑vars
now completely supports TS - so this rule is no longer required.no‑unused‑vars
no‑use‑before‑define
no‑useless‑constructor
no‑var‑requires
non‑nullable‑type‑assertion‑style
object‑curly‑spacing
prefer‑as‑const
prefer‑enum‑initializers
prefer‑for‑of
prefer‑function‑type
prefer‑includes
prefer‑literal‑enum‑member
prefer‑namespace‑keyword
prefer‑nullish‑coalescing
prefer‑optional‑chain
prefer‑readonly‑parameter‑types
prefer‑readonly
prefer‑reduce‑type‑parameter
prefer‑regexp‑exec
prefer‑return‑this‑type
prefer‑string‑starts‑ends‑with
prefer‑ts‑expect‑error
promise‑function‑async
quotes
require‑array‑sort‑compare
require‑await
restrict‑plus‑operands
restrict‑template‑expressions
return‑await
semi
sort‑type‑union‑intersection‑members
space‑before‑function‑paren
space‑infix‑ops
strict‑boolean‑expressions
switch‑exhaustiveness‑check
triple‑slash‑reference
type‑annotation‑spacing
typedef
unbound‑method
unified‑signatures
The text was updated successfully, but these errors were encountered: