File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ interface Data {
2+ greeting : string
3+ }
4+
5+ export default {
6+ data ( ) : Data {
7+ return { greeting : "Hello" }
8+ } ,
9+ }
Original file line number Diff line number Diff line change @@ -252,6 +252,43 @@ describe("Basic tests", () => {
252252 } )
253253 } )
254254
255+ describe ( "About fixtures/typed.js" , ( ) => {
256+ it ( "should notify no error with 'babel-eslint'" , ( ) => {
257+ const cli = new CLIEngine ( {
258+ cwd : FIXTURE_DIR ,
259+ envs : [ "es6" , "node" ] ,
260+ parser : PARSER_PATH ,
261+ parserOptions : {
262+ parser : "babel-eslint" ,
263+ sourceType : "module" ,
264+ } ,
265+ rules : { semi : [ "error" , "never" ] } ,
266+ useEslintrc : false ,
267+ } )
268+ const report = cli . executeOnFiles ( [ "typed.js" ] )
269+ const messages = report . results [ 0 ] . messages
270+
271+ assert ( messages . length === 0 )
272+ } )
273+
274+ it ( "should notify no error with 'typescript-eslint-parser'" , ( ) => {
275+ const cli = new CLIEngine ( {
276+ cwd : FIXTURE_DIR ,
277+ envs : [ "es6" , "node" ] ,
278+ parser : PARSER_PATH ,
279+ parserOptions : { //
280+ parser : "typescript-eslint-parser" ,
281+ } ,
282+ rules : { semi : [ "error" , "never" ] } ,
283+ useEslintrc : false ,
284+ } )
285+ const report = cli . executeOnFiles ( [ "typed.js" ] )
286+ const messages = report . results [ 0 ] . messages
287+
288+ assert ( messages . length === 0 )
289+ } )
290+ } )
291+
255292 describe ( "About fixtures/typed.vue" , ( ) => {
256293 it ( "should notify no error with 'babel-eslint'" , ( ) => {
257294 const cli = new CLIEngine ( {
You can’t perform that action at this time.
0 commit comments