Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
Revert recent member-ordering changes (#2118)
Browse files Browse the repository at this point in the history
* Revert "member-ordering: Support categories (#2041)"

This reverts commit 18e7604.

* Revert "Rewrite member-ordering rule (#1957)"

This reverts commit e6ca414.
  • Loading branch information
nchen63 authored Jan 25, 2017
1 parent f53ec35 commit aaa2319
Show file tree
Hide file tree
Showing 21 changed files with 274 additions and 407 deletions.
575 changes: 253 additions & 322 deletions src/rules/memberOrderingRule.ts

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions test/rules/member-ordering/custom-categories/test.ts.lint

This file was deleted.

18 changes: 0 additions & 18 deletions test/rules/member-ordering/custom-categories/tslint.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,5 @@ class Constructor2 {
~~~~~~~~~~~~~~~~~ [0]
}

// Works for type literal, just like interface
type T = {
x(): void;
y: number;
~~~~~~~~~~ [0]
}

// Works for class inside object literal
const o = {
foo: class C {
x(): void;
y: number;
~~~~~~~~~~ [0]
}
}
[0]: Declaration of public instance member variable not allowed to appear after declaration of public instance member function

[0]: Declaration of field not allowed after declaration of method. Instead, this should come at the beginning of the class/interface.
12 changes: 0 additions & 12 deletions test/rules/member-ordering/omit-access-modifier/test.ts.lint

This file was deleted.

9 changes: 0 additions & 9 deletions test/rules/member-ordering/omit-access-modifier/tslint.json

This file was deleted.

10 changes: 10 additions & 0 deletions test/rules/member-ordering/private/test.ts.lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class Foo {
private x: number;
private bar(): any {
var bla: { a: string } = {a: '1'};
}
y: number;
~~~~~~~~~~ [0]
}

[0]: Declaration of public instance member variable not allowed to appear after declaration of private instance member function
10 changes: 0 additions & 10 deletions test/rules/member-ordering/public-before-private/test.ts.lint

This file was deleted.

10 changes: 0 additions & 10 deletions test/rules/member-ordering/static-before-instance/test.ts.lint

This file was deleted.

10 changes: 10 additions & 0 deletions test/rules/member-ordering/static/test.ts.lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class Foo {
x: number;
static y: number;
~~~~~~~~~~~~~~~~~ [0]
constructor() {
// nothing to do
}
}

[0]: Declaration of public static member variable not allowed to appear after declaration of public instance member variable

0 comments on commit aaa2319

Please sign in to comment.