Skip to content

Commit

Permalink
chore: apply codacy fixes (#3935)
Browse files Browse the repository at this point in the history
Co-authored-by: shortcuts <vannicattec@gmail.com>
  • Loading branch information
millotp and shortcuts authored Oct 10, 2024
1 parent 6c13ee9 commit 6b07138
Show file tree
Hide file tree
Showing 75 changed files with 1,330 additions and 1,626 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ runs:
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.3
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/tools/cmd/goimports@v0.22.0
- name: Cache golangci-lint analysis
if: ${{ inputs.language == 'go' }}
Expand Down
2 changes: 1 addition & 1 deletion clients/algoliasearch-client-go/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/algolia/algoliasearch-client-go/v4

go 1.21
go 1.21.11

require github.com/go-playground/validator/v10 v10.22.1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint no-console: 0 */
import { expect, test, vi } from 'vitest';

import { LogLevelEnum } from '../../client-common/src/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint no-console: 0 */
import { expect, test, vi } from 'vitest';

import { LogLevelEnum } from '../../client-common/src/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint no-console: 0 */
import { expect, test, vi } from 'vitest';

import { LogLevelEnum } from '../../client-common/src/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved
import { defineWorkspace } from 'vitest/config';

export default defineWorkspace([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint no-console: 0 */
import { describe, expect, test, vi } from 'vitest';

import { createNullLogger } from '../../logger';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved
import { defineWorkspace } from 'vitest/config';

export default defineWorkspace([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint no-console: 0 */
import { beforeEach, describe, expect, test, vi } from 'vitest';

import { LogLevelEnum } from '@algolia/client-common';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint no-console: 0 */
import type { LogLevelType, Logger } from '@algolia/client-common';
import { LogLevelEnum } from '@algolia/client-common';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved
import { defineWorkspace } from 'vitest/config';

export default defineWorkspace([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved
import { defineConfig } from 'vitest/config';

export default defineConfig({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ describe('status code handling', () => {
const data = Buffer.from('äöü');

// create a test response stream that is chunked inside a unicode character
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function* generate() {
yield data.subarray(0, 3);
yield data.subarray(3);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved
import { defineConfig } from 'vitest/config';

export default defineConfig({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ describe('status code handling', () => {
const data = Buffer.from('äöü');

// create a test response stream that is chunked inside a unicode character
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function* generate() {
yield data.subarray(0, 3);
yield data.subarray(3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export function createHttpRequester({
function send(request: EndRequest): Promise<Response> {
return new Promise((resolve) => {
let responseTimeout: NodeJS.Timeout | undefined;
// eslint-disable-next-line prefer-const -- linter thinks this is not reassigned
let connectTimeout: NodeJS.Timeout | undefined;
const url = new URL(request.url);
const path = url.search === null ? url.pathname : `${url.pathname}${url.search}`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved
import { defineConfig } from 'vitest/config';

export default defineConfig({
Expand Down
Loading

0 comments on commit 6b07138

Please sign in to comment.