Skip to content

Commit 23fcd47

Browse files
style: remove useless ts-ignore, fix no-use-before-define
1 parent c57dd28 commit 23fcd47

File tree

6 files changed

+5
-15
lines changed

6 files changed

+5
-15
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
"rules": {
106106
"@typescript-eslint/no-var-requires": 0,
107107
"@typescript-eslint/ban-ts-ignore": 0,
108-
"@typescript-eslint/no-use-before-define": 0,
109108
"@typescript-eslint/no-explicit-any": 0,
110109
"@typescript-eslint/explicit-function-return-type": 0,
111110
"@typescript-eslint/explicit-member-accessibility": 0

test/functional/lib/mock_gitlab_server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ export default class GitlabServer {
1717

1818
start(port: number): Promise<any> {
1919
return new Promise(resolve => {
20-
// @ts-ignore
2120
this.app.use(bodyParser.json());
22-
// @ts-ignore
2321
this.app.use(
2422
bodyParser.urlencoded({
2523
extended: true,

test/functional/publish/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { CREDENTIALS, PACKAGE, WRONG_CREDENTIALS } from '../config.functional';
22
import { HTTP_STATUS } from '../../lib/constants';
33

44
export default (server: any, gitlab: any) => {
5-
// eslint-disable-line no-unused-vars
6-
75
describe('package publish tests', () => {
86
beforeEach(() => {
97
return server.auth(CREDENTIALS.user, CREDENTIALS.password);

test/lib/request.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ import { IRequestPromise } from '../types';
77

88
const requestData = Symbol('smart_request_data');
99

10+
function injectResponse(smartObject: any, promise: Promise<any>): Promise<any> {
11+
promise[requestData] = smartObject[requestData];
12+
return promise;
13+
}
14+
1015
export class PromiseAssert extends Promise<any> implements IRequestPromise {
1116
public constructor(options: any) {
1217
super(options);
@@ -53,7 +58,6 @@ export class PromiseAssert extends Promise<any> implements IRequestPromise {
5358
}
5459

5560
public body_error(expected: any) {
56-
// $FlowFixMe
5761
const selfData = this[requestData];
5862

5963
return injectResponse(
@@ -98,12 +102,6 @@ export class PromiseAssert extends Promise<any> implements IRequestPromise {
98102
}
99103
}
100104

101-
function injectResponse(smartObject: any, promise: Promise<any>): Promise<any> {
102-
// $FlowFixMe
103-
promise[requestData] = smartObject[requestData];
104-
return promise;
105-
}
106-
107105
function smartRequest(options: any): Promise<any> {
108106
const smartObject: any = {};
109107

test/lib/server_process.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export default class VerdaccioProcess implements IServerProcess {
5454
};
5555

5656
if (this.isDebug) {
57-
// @ts-ignore
5857
const debugPort = parseInt(this.config.port, 10) + 5;
5958

6059
childOptions = Object.assign({}, childOptions, {

test/unit/partials/config/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ const verdaccioGitlabConfig: VerdaccioGitlabConfig = {
1111
};
1212

1313
const options: PluginOptions<VerdaccioGitlabConfig> = {
14-
// @ts-ignore
1514
config: {},
16-
// @ts-ignore
1715
logger: logger
1816
};
1917

0 commit comments

Comments
 (0)