Skip to content

Commit 97a0585

Browse files
authored
chore: update ts and es-lint (#8405)
* chore: update ts, node and lint * add a comment in lint config
1 parent 67cbdb7 commit 97a0585

File tree

6 files changed

+48
-26
lines changed

6 files changed

+48
-26
lines changed

.eslintrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
],
77
"parser": "@typescript-eslint/parser",
88
"plugins": ["@typescript-eslint", "prettier"],
9+
"parserOptions": {
10+
"ecmaVersion": 2024,
11+
"sourceType": "module"
12+
},
913
"rules": {
1014
"react-hooks/exhaustive-deps": "error",
1115
"@typescript-eslint/no-explicit-any": "warn",

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@
3939
"@testing-library/user-event": "^13.5.0",
4040
"@types/fs-extra": "^9.0.1",
4141
"@types/jest": "^26.0.19",
42-
"@types/node": "^12.12.9",
42+
"@types/node": "^20.0.0",
4343
"@types/react": "^18.0.0",
4444
"@types/url-parse": "^1.4.3",
4545
"@typescript-eslint/eslint-plugin": "^6.13.1",
46+
"@typescript-eslint/parser": "^6.13.1",
4647
"axios": "^1.11.0",
4748
"cheerio": "^1.0.0-rc.12",
4849
"classnames": "^2.3.2",
@@ -79,7 +80,7 @@
7980
"tiny-glob": "0.2.9",
8081
"ts-jest": "^29.1.2",
8182
"ts-node": "^8.5.0",
82-
"typescript": "^4.9",
83+
"typescript": "^5.3.0",
8384
"unist-util-visit": "^4.1.0"
8485
},
8586
"resolutions": {

src/directory/generateFlatDirectory.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { fileURLToPath } from 'url';
22
import path from 'path';
33
import { writeFile } from 'fs/promises';
4-
import directory from './directory.json' assert { type: 'json' };
4+
import directory from './directory.json' with { type: 'json' };
55

66
function flattenJSON(jsonObj, flattened = {}) {
77
if (Array.isArray(jsonObj.children)) {

tsconfig.base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"removeComments": true,
1616
"strict": true,
1717
"strictPropertyInitialization": false,
18-
"target": "es2017"
18+
"target": "ES2024"
1919
},
2020
"exclude": ["node_modules"]
2121
}

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
33
"downlevelIteration": true,
4-
"lib": ["es2017", "dom"],
5-
"module": "commonjs",
4+
"lib": ["ES2024", "dom"],
5+
"module": "ESNext",
66
"resolveJsonModule": true,
77
"typeRoots": ["node_modules/@types", "capi/node_modules/@types"],
88
"allowJs": true,

yarn.lock

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4558,7 +4558,7 @@ __metadata:
45584558
languageName: node
45594559
linkType: hard
45604560

4561-
"@types/node@npm:*, @types/node@npm:^12.12.9":
4561+
"@types/node@npm:*":
45624562
version: 12.20.55
45634563
resolution: "@types/node@npm:12.20.55"
45644564
checksum: 10c0/3b190bb0410047d489c49bbaab592d2e6630de6a50f00ba3d7d513d59401d279972a8f5a598b5bb8ddc1702f8a2f4ec57a65d93852f9c329639738e7053637d1
@@ -4572,6 +4572,15 @@ __metadata:
45724572
languageName: node
45734573
linkType: hard
45744574

4575+
"@types/node@npm:^20.0.0":
4576+
version: 20.19.9
4577+
resolution: "@types/node@npm:20.19.9"
4578+
dependencies:
4579+
undici-types: "npm:~6.21.0"
4580+
checksum: 10c0/c6738131f1698258a5ac1e0185e4fc56977f7f566cd0ee11167f93f2339478470257bd82c5e1908a936a204e0ad7996d741356a1a07c04997a236161ea23a874
4581+
languageName: node
4582+
linkType: hard
4583+
45754584
"@types/parse5@npm:^5.0.0":
45764585
version: 5.0.3
45774586
resolution: "@types/parse5@npm:5.0.3"
@@ -4735,7 +4744,7 @@ __metadata:
47354744
languageName: node
47364745
linkType: hard
47374746

4738-
"@typescript-eslint/parser@npm:^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0":
4747+
"@typescript-eslint/parser@npm:^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0, @typescript-eslint/parser@npm:^6.13.1":
47394748
version: 6.21.0
47404749
resolution: "@typescript-eslint/parser@npm:6.21.0"
47414750
dependencies:
@@ -6862,10 +6871,11 @@ __metadata:
68626871
"@testing-library/user-event": "npm:^13.5.0"
68636872
"@types/fs-extra": "npm:^9.0.1"
68646873
"@types/jest": "npm:^26.0.19"
6865-
"@types/node": "npm:^12.12.9"
6874+
"@types/node": "npm:^20.0.0"
68666875
"@types/react": "npm:^18.0.0"
68676876
"@types/url-parse": "npm:^1.4.3"
68686877
"@typescript-eslint/eslint-plugin": "npm:^6.13.1"
6878+
"@typescript-eslint/parser": "npm:^6.13.1"
68696879
ajv: "npm:^8.16.0"
68706880
aws-amplify: "npm:^6.0.9"
68716881
axios: "npm:^1.11.0"
@@ -6914,7 +6924,7 @@ __metadata:
69146924
tiny-glob: "npm:0.2.9"
69156925
ts-jest: "npm:^29.1.2"
69166926
ts-node: "npm:^8.5.0"
6917-
typescript: "npm:^4.9"
6927+
typescript: "npm:^5.3.0"
69186928
unist-util-visit: "npm:^4.1.0"
69196929
languageName: unknown
69206930
linkType: soft
@@ -15013,23 +15023,23 @@ __metadata:
1501315023
languageName: node
1501415024
linkType: hard
1501515025

15016-
"typescript@npm:^4.9":
15017-
version: 4.9.5
15018-
resolution: "typescript@npm:4.9.5"
15026+
"typescript@npm:^5.2.2":
15027+
version: 5.3.3
15028+
resolution: "typescript@npm:5.3.3"
1501915029
bin:
1502015030
tsc: bin/tsc
1502115031
tsserver: bin/tsserver
15022-
checksum: 10c0/5f6cad2e728a8a063521328e612d7876e12f0d8a8390d3b3aaa452a6a65e24e9ac8ea22beb72a924fd96ea0a49ea63bb4e251fb922b12eedfb7f7a26475e5c56
15032+
checksum: 10c0/e33cef99d82573624fc0f854a2980322714986bc35b9cb4d1ce736ed182aeab78e2cb32b385efa493b2a976ef52c53e20d6c6918312353a91850e2b76f1ea44f
1502315033
languageName: node
1502415034
linkType: hard
1502515035

15026-
"typescript@npm:^5.2.2":
15027-
version: 5.3.3
15028-
resolution: "typescript@npm:5.3.3"
15036+
"typescript@npm:^5.3.0":
15037+
version: 5.9.2
15038+
resolution: "typescript@npm:5.9.2"
1502915039
bin:
1503015040
tsc: bin/tsc
1503115041
tsserver: bin/tsserver
15032-
checksum: 10c0/e33cef99d82573624fc0f854a2980322714986bc35b9cb4d1ce736ed182aeab78e2cb32b385efa493b2a976ef52c53e20d6c6918312353a91850e2b76f1ea44f
15042+
checksum: 10c0/cd635d50f02d6cf98ed42de2f76289701c1ec587a363369255f01ed15aaf22be0813226bff3c53e99d971f9b540e0b3cc7583dbe05faded49b1b0bed2f638a18
1503315043
languageName: node
1503415044
linkType: hard
1503515045

@@ -15043,23 +15053,23 @@ __metadata:
1504315053
languageName: node
1504415054
linkType: hard
1504515055

15046-
"typescript@patch:typescript@npm%3A^4.9#optional!builtin<compat/typescript>":
15047-
version: 4.9.5
15048-
resolution: "typescript@patch:typescript@npm%3A4.9.5#optional!builtin<compat/typescript>::version=4.9.5&hash=289587"
15056+
"typescript@patch:typescript@npm%3A^5.2.2#optional!builtin<compat/typescript>":
15057+
version: 5.3.3
15058+
resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"
1504915059
bin:
1505015060
tsc: bin/tsc
1505115061
tsserver: bin/tsserver
15052-
checksum: 10c0/e3333f887c6829dfe0ab6c1dbe0dd1e3e2aeb56c66460cb85c5440c566f900c833d370ca34eb47558c0c69e78ced4bfe09b8f4f98b6de7afed9b84b8d1dd06a1
15062+
checksum: 10c0/1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500
1505315063
languageName: node
1505415064
linkType: hard
1505515065

15056-
"typescript@patch:typescript@npm%3A^5.2.2#optional!builtin<compat/typescript>":
15057-
version: 5.3.3
15058-
resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"
15066+
"typescript@patch:typescript@npm%3A^5.3.0#optional!builtin<compat/typescript>":
15067+
version: 5.9.2
15068+
resolution: "typescript@patch:typescript@npm%3A5.9.2#optional!builtin<compat/typescript>::version=5.9.2&hash=5786d5"
1505915069
bin:
1506015070
tsc: bin/tsc
1506115071
tsserver: bin/tsserver
15062-
checksum: 10c0/1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500
15072+
checksum: 10c0/34d2a8e23eb8e0d1875072064d5e1d9c102e0bdce56a10a25c0b917b8aa9001a9cf5c225df12497e99da107dc379360bc138163c66b55b95f5b105b50578067e
1506315073
languageName: node
1506415074
linkType: hard
1506515075

@@ -15104,6 +15114,13 @@ __metadata:
1510415114
languageName: node
1510515115
linkType: hard
1510615116

15117+
"undici-types@npm:~6.21.0":
15118+
version: 6.21.0
15119+
resolution: "undici-types@npm:6.21.0"
15120+
checksum: 10c0/c01ed51829b10aa72fc3ce64b747f8e74ae9b60eafa19a7b46ef624403508a54c526ffab06a14a26b3120d055e1104d7abe7c9017e83ced038ea5cf52f8d5e04
15121+
languageName: node
15122+
linkType: hard
15123+
1510715124
"undici@npm:^5.25.4":
1510815125
version: 5.29.0
1510915126
resolution: "undici@npm:5.29.0"

0 commit comments

Comments
 (0)