Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not add dangling comma on functions #299

Merged
merged 1 commit into from
Feb 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ module.exports = {
'no-param-reassign': 0, // sometimes it's just much easier
'lines-between-class-members': 0, // grouping related one-liners can be nice
'no-continue': 0,
// override airbnb - breaks old version of node - https://github.com/eslint/eslint/issues/7749
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'never', // this breaks
}],
},
overrides: [
{ // extra jest related rules for tests
Expand Down
2 changes: 1 addition & 1 deletion lib/GoogleSpreadsheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GoogleSpreadsheet {
this.axios.interceptors.request.use(this._setAxiosRequestAuth.bind(this));
this.axios.interceptors.response.use(
this._handleAxiosResponse.bind(this),
this._handleAxiosErrors.bind(this),
this._handleAxiosErrors.bind(this)
);

return this;
Expand Down
4 changes: 2 additions & 2 deletions lib/GoogleSpreadsheetWorksheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class GoogleSpreadsheetWorksheet {
this,
actualRow,
actualColumn,
cellData,
cellData
);
}
}
Expand Down Expand Up @@ -405,7 +405,7 @@ class GoogleSpreadsheetWorksheet {
const lastRow = firstRow + options.limit - 1; // inclusive so we subtract 1
const lastColumn = columnToLetter(this.headerValues.length);
const rawRows = await this.getCellsInRange(
`A${firstRow}:${lastColumn}${lastRow}`,
`A${firstRow}:${lastColumn}${lastRow}`
);

if (!rawRows) return [];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Theo Ephraim <[email protected]> (https://theoephraim.com)",
"name": "google-spreadsheet",
"description": "Google Sheets API (v4) -- simple interface to read/write data and manage sheets",
"version": "3.0.7",
"version": "3.0.8",
"license": "Unlicense",
"keywords": [
"google spreadsheets",
Expand Down
6 changes: 3 additions & 3 deletions test/auth.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('Authentication', () => {
describe('without setting auth', () => {
it('loadInfo should fail on any doc', async () => {
await expect(docs.public.loadInfo()).rejects.toThrow(
'initialize some kind of auth',
'initialize some kind of auth'
);
});
});
Expand Down Expand Up @@ -91,10 +91,10 @@ describe('Authentication', () => {
(badCreds, description) => {
it(`should fail for bad creds - ${description}`, async () => {
await expect(
docs.private.useServiceAccountAuth(badCreds),
docs.private.useServiceAccountAuth(badCreds)
).rejects.toThrow();
});
},
}
);
});

Expand Down
2 changes: 1 addition & 1 deletion test/rows.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ describe('Row-based operations', () => {
rows = await sheet.getRows();
expect(rows[0].col1).toEqual(value);
});
},
}
);
});
});
Expand Down