Skip to content
This repository was archived by the owner on Apr 15, 2023. It is now read-only.

Commit 8eeb6a7

Browse files
committed
typescript-eslint-parser 17.0.1
Add addition tests for eslint/typescript-eslint-parser#491
1 parent d25f71b commit 8eeb6a7

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"mocha": "^4.0.1",
3636
"prettier": "^1.11.1",
3737
"typescript": "~2.9",
38-
"typescript-eslint-parser": "^16.0.1"
38+
"typescript-eslint-parser": "^17.0.1"
3939
},
4040
"lint-staged": {
4141
"*.js": [

tests/lib/rules/explicit-member-accessibility.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ class Test {
3030
public getX () {
3131
return this.x
3232
}
33+
}
34+
`
35+
},
36+
{
37+
filename: "test.ts",
38+
code: `
39+
class Test {
40+
protected name: string
41+
protected foo?: string
42+
public "foo-bar"?: string
3343
}
3444
`
3545
},
@@ -82,6 +92,31 @@ class Test {
8292
column: 3
8393
}
8494
]
95+
},
96+
{
97+
filename: "test.ts",
98+
code: `
99+
class Test {
100+
x?: number
101+
getX? () {
102+
return this.x
103+
}
104+
}
105+
`,
106+
errors: [
107+
{
108+
message:
109+
"Missing accessibility modifier on class property x.",
110+
line: 3,
111+
column: 3
112+
},
113+
{
114+
message:
115+
"Missing accessibility modifier on method definition getX.",
116+
line: 4,
117+
column: 3
118+
}
119+
]
85120
}
86121
]
87122
});

tests/lib/rules/member-ordering.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ interface Foo {
161161
D: string;
162162
E: string;
163163
F: string;
164+
G?: string;
164165
J();
165166
K();
166167
L();

0 commit comments

Comments
 (0)