Skip to content

Commit 5892049

Browse files
committed
Bump typescript and @typescript-eslint
Let's bump our typescript tooling to something a bit more recent, there are also a few security vulnerabilities associated to earlier `@typescript-eslint` which are fixed with this change. Note: I've used a bit of a hammer to silence linting errors from `yarn lint`, there may be an argument to revisit linting in a future change to finesse things a tad. In short, - Bump `@typescript-eslint` from 5.30.0 to 7.14.1 - Bump typescript from 4.7.4 to 5.4.5. (I opted for the 5.4.x branch since 5.5.x seems a bit too recent and not mature yet) - We also need to bump eslint-config-oclif-typescript from 1.0.2 to 3.1.8, this is because it has a transitive dependency on an earlier version of `@typescript-eslint` (^4.31.2) [1] that is incompatible with typescript 5.x+ [2] - Squelch linting errors by switching off no-explicit-any in .eslintrc, and also silence unused var errors in test and application code. [1] https://github.com/oclif/eslint-config-oclif-typescript/blob/v1.0.2/package.json#L8-L9 [2] https://stackoverflow.com/a/77124060
1 parent 0da54e8 commit 5892049

File tree

7 files changed

+958
-175
lines changed

7 files changed

+958
-175
lines changed

.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
],
2020
"camelcase": "off",
2121
"@typescript-eslint/camelcase": "off",
22+
"@typescript-eslint/no-explicit-any": "off",
2223
"@typescript-eslint/semi": [
2324
"error",
2425
"never"

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"@types/mocha": "^9.1.1",
1616
"@types/node": "^14.0.14",
1717
"@types/rimraf": "^3.0.2",
18-
"@typescript-eslint/eslint-plugin": "^5.30.0",
19-
"@typescript-eslint/parser": "^5.30.0",
18+
"@typescript-eslint/eslint-plugin": "^7.14.1",
19+
"@typescript-eslint/parser": "^7.14.1",
2020
"chai": "^4",
2121
"eslint": "^8.18.0",
2222
"eslint-config-standard": "^17.0.0",
@@ -32,7 +32,7 @@
3232
"rimraf": "^3.0.2",
3333
"standard": "^17.0.0",
3434
"ts-node": "^10.9.1",
35-
"typescript": "~4.7.4",
35+
"typescript": "~5.4.5",
3636
"yarn-audit-fix": "^9.3.1"
3737
},
3838
"engines": {

packages/zcli-apps/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"chai": "^4",
4545
"eslint": "^8.18.0",
4646
"eslint-config-oclif": "^4.0.0",
47-
"eslint-config-oclif-typescript": "^1.0.2",
47+
"eslint-config-oclif-typescript": "^3.1.8",
4848
"lerna": "^5.1.8",
4949
"mocha": "^10.0.0",
5050
"sinon": "^14.0.0"

packages/zcli-core/src/lib/request.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as chalk from 'chalk'
66
import { EnvVars, varExists } from './env'
77
import { getBaseUrl, getDomain, getSubdomain } from './requestUtils'
88

9-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
9+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
1010
export const requestAPI = async (url: string, options: any = {}, json = false) => {
1111
let auth
1212
if (

packages/zcli-themes/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"chai": "^4",
3939
"eslint": "^8.18.0",
4040
"eslint-config-oclif": "^4.0.0",
41-
"eslint-config-oclif-typescript": "^1.0.2",
41+
"eslint-config-oclif-typescript": "^3.1.8",
4242
"lerna": "^5.1.8",
4343
"mocha": "^10.0.0",
4444
"nock": "^13.2.8",

packages/zcli-themes/tests/functional/update.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ describe('themes:update', function () {
116116
.post('/upload/path')
117117
.reply(200)
118118
})
119+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
119120
.it('should report validation errors', async (ctx) => {
120121
try {
121122
await UpdateCommand.run([baseThemePath, '--themeId', '1111'])

yarn.lock

+950-169
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)