Skip to content

Commit 7f04c7f

Browse files
committed
feat(rules): add tslint-eslint-rules/ter-computed-property-spacing
1 parent cde6c9e commit 7f04c7f

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`should affect error message after formatting 1`] = `
4+
"
5+
<<<<<< before
6+
no error
7+
8+
======
9+
ERROR: (ter-computed-property-spacing) /src/tslint-eslint-rules/ter-computed-property-spacing/test.ts[1, 4]: A space is required after '['.
10+
ERROR: (ter-computed-property-spacing) /src/tslint-eslint-rules/ter-computed-property-spacing/test.ts[1, 8]: A space is required before ']'.
11+
ERROR: (ter-computed-property-spacing) /src/tslint-eslint-rules/ter-computed-property-spacing/test.ts[2, 4]: A space is required after '['.
12+
ERROR: (ter-computed-property-spacing) /src/tslint-eslint-rules/ter-computed-property-spacing/test.ts[2, 10]: A space is required before ']'.
13+
14+
>>>>>> after
15+
"
16+
`;
17+
18+
exports[`should be pretty after formatting 1`] = `
19+
"
20+
<<<<<< before
21+
obj[ foo ];
22+
obj[ 'foo' ];
23+
24+
======
25+
obj[foo];
26+
obj[\\"foo\\"];
27+
28+
>>>>>> after
29+
"
30+
`;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
obj[ foo ];
2+
obj[ 'foo' ];
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../tslint.json",
3+
"rules": {
4+
"ter-computed-property-spacing": [true, "always"]
5+
}
6+
}

0 commit comments

Comments
 (0)