Skip to content

Commit

Permalink
Fix prettier (#307)
Browse files Browse the repository at this point in the history
# Summary
It appears the glob for prettier was never updated after this repo was converted to TypeScript.

# Testing
`npm run format` now formats ts and js files
  • Loading branch information
kevinwilde-at authored Mar 31, 2022
1 parent 56e81e6 commit 1692852
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"pretest": "npm run lint && npm run prepare && cp build/airtable.browser.js test/test_files; true",
"lint": "eslint '*/**/*.{js,ts,tsx}'",
"format": "prettier --write '**/*.js'",
"format": "prettier --write '**/*.[j|t]s'",
"test": "jest --env node --coverage --no-cache",
"test-unit": "jest --env node",
"prepare": "rm -rf lib/* && rm -f build/airtable.browser.js && tsc && cp lib/airtable.js lib/tmp_airtable.js && grunt browserify && rm lib/tmp_airtable.js"
Expand Down
6 changes: 1 addition & 5 deletions src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ class Base {

const controller = new AbortController();
const headers = this._getRequestHeaders(
Object.assign(
{},
this._airtable._customHeaders,
options.headers ?? {}
)
Object.assign({}, this._airtable._customHeaders, options.headers ?? {})
);

const requestOptions: RequestInit = {
Expand Down
6 changes: 5 additions & 1 deletion src/deprecate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ const didWarnForDeprecation = {};
*
* @return a wrapped function
*/
function deprecate<Args extends unknown[]>(fn: (...args: Args) => void, key: string, message: string): (...args: Args) => void {
function deprecate<Args extends unknown[]>(
fn: (...args: Args) => void,
key: string,
message: string
): (...args: Args) => void {
return function(...args: Args): void {
if (!didWarnForDeprecation[key]) {
didWarnForDeprecation[key] = true;
Expand Down
3 changes: 1 addition & 2 deletions src/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// istanbul ignore file
import nodeFetch from 'node-fetch';

export =
typeof window === 'undefined' ? (nodeFetch as typeof fetch) : window.fetch.bind(window);
export = typeof window === 'undefined' ? (nodeFetch as typeof fetch) : window.fetch.bind(window);

0 comments on commit 1692852

Please sign in to comment.