From 2f79fde5e74f7fb1c017adb0a3a47d72e5f7caa2 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Fri, 12 Apr 2024 18:34:26 +0700 Subject: [PATCH] test: add TypeScript support to new flat ESLint config --- eslint.config.js | 3 +++ package.json | 5 ++--- yarn.lock | 23 +++++++++++++++++++---- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 9ec6204..99f3dcf 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,7 +1,10 @@ import eslint from "@eslint/js"; +import tseslint from "typescript-eslint"; export default [ eslint.configs.recommended, + ...tseslint.configs.recommended, + ...tseslint.configs.stylistic, { ignores: [".*", "dist"], }, diff --git a/package.json b/package.json index 838e84b..416c70b 100644 --- a/package.json +++ b/package.json @@ -17,14 +17,13 @@ "@jest/globals": "^29.7.0", "@types/jest": "^29.5.12", "@types/node": "^20.11.30", - "@typescript-eslint/eslint-plugin": "^7.6.0", - "@typescript-eslint/parser": "^7.6.0", "@vercel/ncc": "^0.38.1", "eslint": "^8.57.0", "jest": "^29.7.0", "prettier": "^3.2.5", "ts-jest": "^29.1.2", - "typescript": "^5.4.5" + "typescript": "^5.4.5", + "typescript-eslint": "^7.6.0" }, "packageManager": "yarn@4.1.1" } diff --git a/yarn.lock b/yarn.lock index 1263dd1..ea03b6e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1059,7 +1059,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^7.6.0": +"@typescript-eslint/eslint-plugin@npm:7.6.0": version: 7.6.0 resolution: "@typescript-eslint/eslint-plugin@npm:7.6.0" dependencies: @@ -1084,7 +1084,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/parser@npm:^7.6.0": +"@typescript-eslint/parser@npm:7.6.0": version: 7.6.0 resolution: "@typescript-eslint/parser@npm:7.6.0" dependencies: @@ -3877,14 +3877,13 @@ __metadata: "@jest/globals": "npm:^29.7.0" "@types/jest": "npm:^29.5.12" "@types/node": "npm:^20.11.30" - "@typescript-eslint/eslint-plugin": "npm:^7.6.0" - "@typescript-eslint/parser": "npm:^7.6.0" "@vercel/ncc": "npm:^0.38.1" eslint: "npm:^8.57.0" jest: "npm:^29.7.0" prettier: "npm:^3.2.5" ts-jest: "npm:^29.1.2" typescript: "npm:^5.4.5" + typescript-eslint: "npm:^7.6.0" languageName: unknown linkType: soft @@ -4284,6 +4283,22 @@ __metadata: languageName: node linkType: hard +"typescript-eslint@npm:^7.6.0": + version: 7.6.0 + resolution: "typescript-eslint@npm:7.6.0" + dependencies: + "@typescript-eslint/eslint-plugin": "npm:7.6.0" + "@typescript-eslint/parser": "npm:7.6.0" + "@typescript-eslint/utils": "npm:7.6.0" + peerDependencies: + eslint: ^8.56.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/1950ae59069860cc802de9c1c4f15013099b677b47cabc8dc24200dbe9a4a5a3db5ff9b88e6813658b089e16294d75835b6c17d13a445cf29c954a71eb27ff6f + languageName: node + linkType: hard + "typescript@npm:^5.4.5": version: 5.4.5 resolution: "typescript@npm:5.4.5"