forked from palantir/tslint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[object-literal-sort-keys] add ignore-blank-lines option (palantir#4808)
- Loading branch information
1 parent
958ba28
commit 9924e7a
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
test/rules/object-literal-sort-keys/ignore-blank-lines/test.ts.lint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
var testPassA = { | ||
a: 'a', | ||
|
||
b: 'b', | ||
|
||
c: 'c', | ||
}; | ||
|
||
var testFailA = { | ||
b: 'b', | ||
|
||
a: 'a', | ||
~ [err % ('a')] | ||
c: 'c', | ||
}; | ||
|
||
var testFailB = { | ||
a: 'a', | ||
|
||
c: 'c', | ||
|
||
b: 'b', | ||
~ [err % ('b')] | ||
}; | ||
|
||
[err]: The key '%s' is not sorted alphabetically |
5 changes: 5 additions & 0 deletions
5
test/rules/object-literal-sort-keys/ignore-blank-lines/tslint.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"rules": { | ||
"object-literal-sort-keys": [true, "ignore-blank-lines"] | ||
} | ||
} |