Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Update member-ordering rule in template #87

Open
corydeppen opened this issue Jun 17, 2017 · 3 comments
Open

Update member-ordering rule in template #87

corydeppen opened this issue Jun 17, 2017 · 3 comments

Comments

@corydeppen
Copy link

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.

@wmonk
Copy link
Owner

wmonk commented Aug 7, 2017

I think that this should be solved by #112 - please provide feedback once this lands.

@NiroSugir
Copy link

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.

@r3nya
Copy link
Contributor

r3nya commented Oct 2, 2018

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. 😉

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

No branches or pull requests

4 participants