Disable the unicorn/prevent-abbreviations
rule
#235
Replies: 3 comments 1 reply
-
It is important to not use abbreviations in code because it can make the code harder to understand and maintain. Abbreviations can be ambiguous and may not be immediately clear to other developers who are reading the code, especially to developers that are not familiar with a project. Using descriptive and meaningful names for variables, functions, and classes helps improve code readability and reduces the chances of misunderstandings. function myFunction(res: Response, e: Error) {
... Imagine the function signature is not visible because the function body has many lines of code.
|
Beta Was this translation helpful? Give feedback.
-
There are still cases we can choose to allow in our config (e.g. props vs properties, or params vs parameters). Mainly because these are conventions when working with certain frameworks/libraries. The names are auto-fixed, so it shouldn't really be in the way most of the time (and when they are in the way, it's likely an exception can be configured). |
Beta Was this translation helpful? Give feedback.
-
The main issue with this rule is sometimes you end up with conflicting names in your components. With this rule you cannot just write something like:
You would have to write it like:
Now causing another error because Then you will endup with
This introduces verbosity. Breaks the development flow. And consider devs to be like babies. Honestly, if a dev doesn't know that |
Beta Was this translation helpful? Give feedback.
-
There is a proposal to disable the
unicorn/prevent-abbreviations
rule.Please see the documentation
Beta Was this translation helpful? Give feedback.
All reactions