From 251e7fd8cd3d47bbc6b45e2ea16337056806abe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Str=C3=B8iman?= Date: Mon, 5 Aug 2024 16:31:28 +0200 Subject: [PATCH] Replace TS eslint with `typescript-eslint` This replaces the older @typescript-eslint/* packages with new flat-file aware configuration. --- eslint.config.mjs | 3 +- package-lock.json | 75 ----------------------------------------------- package.json | 2 -- 3 files changed, 1 insertion(+), 79 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index b2f587eb9..f20af96ba 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,13 +1,12 @@ // @ts-check import globals from "globals"; -import eslint from "@eslint/js"; import tseslint from "typescript-eslint"; export default tseslint.config( { ignores: ["**/node_modules/", "**/main.js"], }, - eslint.configs.recommended, + ...tseslint.configs.recommended, { plugins: { "@typescript-eslint": tseslint.plugin, diff --git a/package-lock.json b/package-lock.json index 410462b86..252bfcca7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,6 @@ "version": "1.0.0", "license": "MIT", "devDependencies": { - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.8.0", "@types/node": "^16.11.6", "builtin-modules": "^4.0.0", "esbuild": "^0.23.0", @@ -449,50 +447,6 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/js": { - "version": "9.8.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.8.0.tgz", - "integrity": "sha512-MfluB7EUfxXtv3i/++oh89uzAr4PDI4nn201hsp+qaXqsjAWzinlZEHEfPgAX4doIlKvPG/i0A9dpKxOLII8yA==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -1229,35 +1183,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/espree": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", - "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", - "dev": true, - "dependencies": { - "acorn": "^8.12.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/esquery": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", diff --git a/package.json b/package.json index 244c547b1..19f91c884 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,6 @@ "author": "", "license": "MIT", "devDependencies": { - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.8.0", "@types/node": "^16.11.6", "builtin-modules": "^4.0.0", "esbuild": "^0.23.0",