Docs: Establish preference for objects over strings in rule options #6040
Replies: 1 comment
-
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 |
Beta Was this translation helpful? Give feedback.
-
Before You File a Documentation Request Please Confirm You Have Done The Following...
Suggested Changes
Following 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
Beta Was this translation helpful? Give feedback.
All reactions