Skip to content

Commit

Permalink
typescript: do not lint lib/* and do coverage with sourcemaps
Browse files Browse the repository at this point in the history
- do not lint build directory lib/*
- output source maps from typescript files for coverage testing
- fix a istanbul ignore in fetch.ts
  • Loading branch information
mzgoddard committed Aug 5, 2020
1 parent ea881fc commit 97004bb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules/
/build/
/build/airtable.browser.js
/test/test_files/airtable.browser.js
/lib/
4 changes: 2 additions & 2 deletions src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const userAgent = `Airtable.js/${packageVersion}`;
type BaseRequestOptions = {
method?: string;
path?: string;
qs?: {};
headers?: {};
qs?: any;
headers?: any;
body?: any;
_numAttempts?: number;
};
Expand Down
6 changes: 4 additions & 2 deletions src/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import nodeFetch from 'node-fetch';

// istanbul ignore next
export = typeof window === 'undefined' ? (nodeFetch as typeof fetch) : fetch;
export = (
// istanbul ignore next
typeof window === 'undefined' ? (nodeFetch as typeof fetch) : fetch
);
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"esModuleInterop": true,
"outDir": "lib",
"noImplicitAny": false,
"strict": false
"strict": false,
"sourceMap": true
},
"include": ["src/**/*.ts", "src/internal_config.json"]
}

0 comments on commit 97004bb

Please sign in to comment.