Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Recommended value for member-ordering rule is pointless #341

Closed
Livven opened this issue Feb 13, 2017 · 5 comments
Closed

Recommended value for member-ordering rule is pointless #341

Livven opened this issue Feb 13, 2017 · 5 comments
Assignees
Milestone

Comments

@Livven
Copy link

Livven commented Feb 13, 2017

The recommended_ruleset.js includes a "member-ordering": true rule which in that form doesn't actually do anything.

See the documentation.

@tommck
Copy link

tommck commented Feb 15, 2017

Actually, over 10 of the rules give me linting errors because they expect arrays when the value in the recommended is "true" or "false"

@Livven
Copy link
Author

Livven commented Feb 16, 2017

@tommck I think most of those are simply due to the schema not allowing an array or a boolean at the same time. It's perfectly valid to disable an option with just a false even if enabling it would require an array of parameters.

However for some options just a true is indeed not enough, as with member-ordering.

@HamletDRC
Copy link
Member

Do any of you have a preferred recommended default value?

@tommck which other rules have invalid default parameters? I am not linting the file, so whether or not you get linting errors depends I guess on what your linting tool and linting rules are.

@HamletDRC
Copy link
Member

If anyone wants to make a proposed default value then just edit line 143 of this file: https://github.com/Microsoft/tslint-microsoft-contrib/blob/master/additional_rule_metadata.json

I'll accept the pull request that automatically is sent when you click save :)

@HamletDRC HamletDRC added this to the 3.0.1 milestone Feb 17, 2017
@HamletDRC HamletDRC self-assigned this Feb 17, 2017
@HamletDRC
Copy link
Member

I set the default to [true, { "order": "fields-first" }]

Feel free to change this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants