Skip to content

Commit 50c2650

Browse files
committed
Fix release workflow
1 parent 43c567b commit 50c2650

File tree

10 files changed

+167
-133
lines changed

10 files changed

+167
-133
lines changed

.eslintrc.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
module.exports = {
2-
root: false,
2+
root: true,
33
env: {
44
node: true,
55
es6: true,
66
mocha: true,
77
},
88
extends: [
9-
'standard',
9+
'eslint:recommended',
1010
'plugin:@typescript-eslint/recommended',
1111
],
1212
rules: {
1313
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
1414
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
1515
'comma-dangle': [ 'error', 'always-multiline' ],
16+
'@typescript-eslint/no-require-imports': 'off',
1617
},
1718
parser: '@typescript-eslint/parser',
1819
plugins: [

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@typescript-eslint/parser": "^8.22.0",
4343
"chai": "^5.1.2",
4444
"chai-as-promised": "^8.0.1",
45-
"eslint": "^9.19.0",
45+
"eslint": "^8.7.2",
4646
"eslint-import-resolver-typescript": "^3.7.0",
4747
"eslint-plugin-import": "^2.31.0",
4848
"eslint-plugin-json": "^4.0.1",

src/bundler/server-scripts.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function BootLoader (outputPath: string, ss: Array<Script>): string {
4343
*
4444
* @constructor
4545
*/
46-
function Pack (entry, context, outputPath): Promise<string> {
46+
function Pack (entry: string, context: string, outputPath: string): Promise<string> {
4747
return new Promise((resolve) => {
4848
const type = 'server-scripts'
4949
const cfg: webpack.Configuration = {
@@ -59,14 +59,14 @@ function Pack (entry, context, outputPath): Promise<string> {
5959
},
6060
}
6161

62-
webpack(cfg).run((err: Error) => {
62+
webpack(cfg).run((err: Error | null) => {
6363
if (err) return console.error(err)
6464
resolve(`${outputPath}/${type}.js`)
6565
})
6666
})
6767
}
6868

69-
function Load (path): Map<string, Partial<Script>> {
69+
function Load (path: string): Map<string, Partial<Script>> {
7070
delete require.cache[require.resolve(path)]
7171
return require(path).default
7272
}

src/grpc-server/errors.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function HandleException (log: Logger, err: APIError, done: grpc.sendUnar
4545
name,
4646
message,
4747
details: '',
48-
metadata: new grpc.Metadata()
48+
metadata: new grpc.Metadata(),
4949
}
5050

5151
if (code !== grpc.status.ABORTED) {

src/grpc-server/server.ts

-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ export function Start ({ addr, certificates }: ServerConfig, logger: Logger, ser
5454
fs.readFileSync(certificates.ca),
5555
[
5656
{
57-
// eslint-disable-next-line @typescript-eslint/camelcase
5857
cert_chain: fs.readFileSync(certificates.public),
59-
// eslint-disable-next-line @typescript-eslint/camelcase
6058
private_key: fs.readFileSync(certificates.private),
6159
},
6260
],

src/scripts/parser.test.ts

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
/* eslint-disable no-unused-expressions,@typescript-eslint/no-empty-function,@typescript-eslint/ban-ts-ignore */
2-
31
import { describe, it } from 'mocha'
42
import * as chai from 'chai'
53
import SourceParser from './parser'
6-
// @ts-ignore
74
import chaiAsPromised from 'chai-as-promised'
85
import { Script } from '../types'
96
import { Trigger } from './trigger'

src/scripts/trigger.test.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable no-unused-expressions,@typescript-eslint/no-empty-function,@typescript-eslint/ban-ts-ignore */
2-
31
import { describe, it } from 'mocha'
42
import { expect } from 'chai'
53
import Make, { Trigger } from './trigger'

src/server.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable @typescript-eslint/ban-ts-ignore */
2-
31
import path from 'path'
42
import logger from './logger'
53
import * as config from './config'
@@ -80,7 +78,7 @@ gRPCServer
8078
.then(corredor => {
8179
const serviceDefinitions: gRPCServer.ServiceDefinition = new Map()
8280
serviceDefinitions.set(
83-
// @ts-ignore
81+
// @ts-expect-error service is defined
8482
corredor.ServerScripts.service,
8583
ServerScriptsHandler(
8684
serverScriptsService,
@@ -89,7 +87,7 @@ gRPCServer
8987
)
9088

9189
serviceDefinitions.set(
92-
// @ts-ignore
90+
// @ts-expect-error service is defined
9391
corredor.ClientScripts.service,
9492
ClientScriptsHandler(
9593
clientScriptsService,
@@ -106,7 +104,9 @@ gRPCServer
106104

107105
try {
108106
Promise.all([
107+
// @ts-expect-error service is defined
109108
serverScriptsService.process(),
109+
// @ts-expect-error service is defined
110110
clientScriptsService.process(),
111111
])
112112

src/services/server-scripts.test.ts

-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { describe, it } from 'mocha'
22
import { expect } from 'chai'
33

4-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
5-
// @ts-ignore
64
import pino from 'pino'
7-
// ^ for some peculiar reason, IDE is not happy with this import
85
import ServerScripts from './server-scripts'
96
import { Trigger } from '../scripts/trigger'
107

0 commit comments

Comments
 (0)