Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
aswasif007 committed Nov 14, 2023
1 parent aa02b51 commit 9cd465f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions __tests__/commands/phpmyadmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
/**
* External dependencies
*/
import { beforeEach, describe, expect, it, jest } from '@jest/globals';
import opn from 'opn';

Check failure on line 6 in __tests__/commands/phpmyadmin.ts

View workflow job for this annotation

GitHub Actions / Type Checker

Could not find a declaration file for module 'opn'. '/home/runner/work/vip-cli/vip-cli/node_modules/opn/index.js' implicitly has an 'any' type.

/**
* Internal dependencies
*/
import { CommandTracker } from '../../src/lib/tracker';
import { PhpMyAdminCommand } from '../../src/commands/phpmyadmin';
import API from '../../src/lib/api';
import { beforeEach, describe, expect, it, jest } from '@jest/globals';
import opn from 'opn';
import { CommandTracker } from '../../src/lib/tracker';

const mutationMock = jest.fn( async () => {
return Promise.resolve( {
Expand Down
5 changes: 2 additions & 3 deletions src/bin/vip-db-phpmyadmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
/**
* Internal dependencies
*/
import { PhpMyAdminCommand } from '../commands/phpmyadmin';
import { App, AppEnvironment } from '../graphqlTypes';
import command from '../lib/cli/command';

import { makeCommandTracker } from '../lib/tracker';
import { App, AppEnvironment } from '../graphqlTypes';
import { PhpMyAdminCommand } from '../commands/phpmyadmin';

const examples = [
{
Expand Down
6 changes: 3 additions & 3 deletions src/commands/phpmyadmin.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
/**
* External dependencies
*/

import { GraphQLFormattedError } from 'graphql';
import gql from 'graphql-tag';
import opn from 'opn';

Check failure on line 6 in src/commands/phpmyadmin.ts

View workflow job for this annotation

GitHub Actions / Type Checker

Could not find a declaration file for module 'opn'. '/home/runner/work/vip-cli/vip-cli/node_modules/opn/index.js' implicitly has an 'any' type.

/**
* Internal dependencies
*/
import { App, AppEnvironment } from '../graphqlTypes';
import API, {
disableGlobalGraphQLErrorHandling,
enableGlobalGraphQLErrorHandling,
} from '../lib/api';
import * as exit from '../lib/cli/exit';
import { CommandTracker } from '../lib/tracker';
import { App, AppEnvironment } from '../graphqlTypes';
import { GraphQLFormattedError } from 'graphql';

export const GENERATE_PHP_MY_ADMIN_URL_MUTATION = gql`
mutation GeneratePhpMyAdminAccess($input: GeneratePhpMyAdminAccessInput) {
Expand Down Expand Up @@ -90,6 +89,7 @@ export class PhpMyAdminCommand {
exit.withError( `Failed to generate PhpMyAdmin URL: ${ error.message }` );
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-call
void opn( url, { wait: false } );
this.log( 'PhpMyAdmin is opened in your default browser.' );
}
Expand Down

0 comments on commit 9cd465f

Please sign in to comment.