Skip to content

Commit

Permalink
feat: allow reference (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
XadillaX authored and popomore committed Oct 26, 2018
1 parent a0e562d commit af9baeb
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
'max-classes-per-file': false,
'no-object-literal-type-assertion': false,
'prefer-object-spread': false,
'no-reference': false,

/**
* eslint best-practices
Expand Down
1 change: 1 addition & 0 deletions reference.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
function helloWorld(str: string): string;
3 changes: 3 additions & 0 deletions test/fixtures/reference/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// <reference path="reference.d.ts" />

helloWorld('a');
3 changes: 3 additions & 0 deletions test/fixtures/reference/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../../index.js"
}
10 changes: 10 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,15 @@ describe('test/index.test.js', () => {
});
});

describe('reference', () => {
const cwd = path.join(__dirname, 'fixtures/reference');

it('should success with reference', () => {
return coffee.spawn('tslint', [ path.resolve(cwd, './index.ts') ])
.debug()
.expect('code', 0)
.end();
});
});
});

0 comments on commit af9baeb

Please sign in to comment.