Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Docs: Establish preference for objects over strings in rule options#6040
-
Before You File a Documentation Request Please Confirm You Have Done The Following...
Suggested ChangesFollowing up on a couple of threads:
I feel moderately strongly that we should standardize on always using the object in new rules. It's more self-documenting and is the format most rules end up using as they gain more options. Affected URL(s)https://github.com/typescript-eslint/typescript-eslint/blob/main/CONTRIBUTING.md |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
Replies: 1 comment
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
I still hold my dissent. Think about function calls: parseCode(code,{failfast:true}); We can refactor that into Differentiating between a primary option and a secondary option highlights the former's importance. The primary option isn't just any option: it determines the entire behavior of the rule. Having Rules that have a primary option are, really, two rules smashed together, with a string option to toggle between two modes. For example, we can imagine splitting |
BetaWas this translation helpful?Give feedback.
All reactions
This discussion was converted from issue #5119 on November 19, 2022 06:01.