create-react-app-typescript
create-react-app-typescript copied to clipboard
Update member-ordering rule in template
The current value for the member-ordering
rule in the tslint.json
template file doesn't appear to be correct. According to the tslint rules for member-ordering
, the order
property should be a preset string or an array of strings. While the current values in the template file were deprecated a while back, it looks like the fields-first
preset may be an appropriate replacement.
I'd be happy to submit a PR for this if you agree this rule should be updated and would like the help.
I think that this should be solved by #112 - please provide feedback once this lands.
Not sure what's happening with #112, so I'd like to correct a little error in case anyone comes across this issue.
The schema is actually not an array of strings, but an object with the key order
that lists the types by which to sort.
"member-ordering": [
true,
"public-before-private",
"static-before-instance",
"variables-before-functions"
],
should be:
"member-ordering": [
true,
{
"order": [
"public-before-private",
"static-before-instance",
"variables-before-functions"
]
}
],
I could make a PR to have this fixed if #112 is stalling or being reconsidered.
Hey @corydeppen!
Looks like this issue is outdated because tslint.json
was changed a lot (https://github.com/wmonk/create-react-app-typescript/blob/master/template/tslint.json).
Please close this issue. 😉