Skip to content

Commit 3cbec79

Browse files
committed
fix: fix tsconfig.json
1 parent baf19b9 commit 3cbec79

5 files changed

Lines changed: 32 additions & 15 deletions

File tree

.eslintrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ module.exports = {
3131
},
3232
env: {
3333
jest: true
34-
}
34+
},
35+
parserOptions: {
36+
project: path.resolve(__dirname, './tsconfig.test.json')
37+
},
3538
}
3639
],
3740
settings: {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import IPData from '../src/ipdata';
1+
import IPData from './ipdata';
22

33
describe('constructor()', () => {
44
it('should throw an error if an apiKey is not provided', () => {
@@ -11,7 +11,7 @@ describe('constructor()', () => {
1111
const ipdata = new IPData(process.env.IPDATA_API_KEY);
1212
expect(ipdata.apiKey).toEqual(process.env.IPDATA_API_KEY);
1313
});
14-
})
14+
});
1515

1616
describe('lookup()', () => {
1717
const ipdata = new IPData(process.env.IPDATA_API_KEY);

tsconfig.base.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"declaration": true,
4+
"esModuleInterop": true,
5+
"importHelpers": true,
6+
"lib": [
7+
"es5",
8+
"es2015.promise"
9+
],
10+
"sourceMap": true,
11+
"target": "es5"
12+
}
13+
}

tsconfig.json

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
{
2+
"extends": "./tsconfig.base.json",
23
"compilerOptions": {
3-
"declaration": true,
4-
"esModuleInterop": true,
5-
"importHelpers": true,
6-
"lib": [
7-
"es5",
8-
"es2015.promise"
9-
],
10-
"outDir": "lib",
11-
"sourceMap": true,
12-
"target": "es5"
4+
"outDir": "lib"
135
},
146
"include": [
15-
"src/**/*",
16-
"test/**/*"
7+
"src/**/*"
8+
],
9+
"exclude": [
10+
"node_modules",
11+
"**/*.test.ts"
1712
]
1813
}

tsconfig.test.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"include": [
4+
"src/**/*"
5+
]
6+
}

0 commit comments

Comments
 (0)