Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit 247aeb7

Browse files
chore: use gts v2 (#757)
* chore: use gts v2 * chore: ahhhhh thaaaats why * chore: do not run on node8 * fix: new gts rules
1 parent 70e0a15 commit 247aeb7

57 files changed

Lines changed: 295 additions & 342 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
**/node_modules
2+
**/.coverage
23
src/**/doc/*
34
build/
45
docs/

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./node_modules/gts"
3+
}

.eslintrc.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
node: [8, 10, 12, 13]
12+
node: [10, 12, 13]
1313
steps:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-node@v1

.prettierrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

.prettierrc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
module.exports = {
16+
...require('gts/.prettierrc.json')
17+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"devDependencies": {
3434
"@compodoc/compodoc": "^1.1.7",
3535
"@types/chai": "^4.1.3",
36+
"@types/download": "^6.2.4",
3637
"@types/lodash.at": "^4.6.4",
3738
"@types/lodash.has": "^4.5.4",
3839
"@types/mocha": "^7.0.0",
@@ -57,7 +58,7 @@
5758
"file-loader": "^6.0.0",
5859
"fs-extra": "^9.0.0",
5960
"google-proto-files": "^1.0.0",
60-
"gts": "^1.0.0",
61+
"gts": "next",
6162
"is-docker": "^2.0.0",
6263
"json-loader": "^0.5.7",
6364
"karma": "^4.1.0",

samples/.eslintrc.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/bundlingCalls/bundleExecutor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export class BundleExecutor {
147147
const bundledField = request[this._descriptor.bundledField] as Array<{}>;
148148
const elementCount = bundledField.length;
149149
let requestBytes = 0;
150+
// eslint-disable-next-line @typescript-eslint/no-this-alias
150151
const self = this;
151152
bundledField.forEach(obj => {
152153
requestBytes += this._descriptor.byteLengthFunction(obj);

src/bundlingCalls/bundlingUtils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import at = require('lodash.at');
2222
import {RequestType} from '../apitypes';
23-
import {Dictionary} from 'lodash';
2423

2524
/**
2625
* Compute the identifier of the `obj`. The objects of the same ID
@@ -40,7 +39,7 @@ export function computeBundleId(
4039
const ids: unknown[] = [];
4140
let hasIds = false;
4241
for (let i = 0; i < discriminatorFields.length; ++i) {
43-
const id = at(obj as Dictionary<unknown>, discriminatorFields[i])[0];
42+
const id = at(obj, discriminatorFields[i])[0];
4443
if (id === undefined) {
4544
ids.push(null);
4645
} else {

0 commit comments

Comments
 (0)