This repository was archived by the owner on Jan 19, 2019. It is now read-only.
File tree 1 file changed +21
-3
lines changed
1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -172,10 +172,10 @@ describe("TypeScript scope analysis", () => {
172
172
} ) ;
173
173
}
174
174
175
- test ( "https://github.com/eslint/typescript-eslint-parser/issues/416" , ( ) => {
176
- const linter = new Linter ( ) ;
177
- linter . defineParser ( "typescript-eslint-parser" , parser ) ;
175
+ const linter = new Linter ( ) ;
176
+ linter . defineParser ( "typescript-eslint-parser" , parser ) ;
178
177
178
+ test ( "https://github.com/eslint/typescript-eslint-parser/issues/416" , ( ) => {
179
179
const code = `
180
180
export type SomeThing = {
181
181
id: string;
@@ -191,4 +191,22 @@ export type SomeThing = {
191
191
192
192
assert . deepStrictEqual ( messages , [ ] ) ;
193
193
} ) ;
194
+
195
+ test ( "https://github.com/eslint/typescript-eslint-parser/issues/435" , ( ) => {
196
+ const code = `
197
+ interface Foo {
198
+ bar: string
199
+ }
200
+ const bar = 'blah'
201
+ ` ;
202
+ const config = {
203
+ parser : "typescript-eslint-parser" ,
204
+ rules : {
205
+ "no-use-before-define" : "error"
206
+ }
207
+ } ;
208
+ const messages = linter . verify ( code , config , { filename : "issue435.ts" } ) ;
209
+
210
+ assert . deepStrictEqual ( messages , [ ] ) ;
211
+ } ) ;
194
212
} ) ;
You can’t perform that action at this time.
0 commit comments