From 53776c244f8bbdc852d57c7b313b0935e755ddc4 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Mon, 6 Mar 2023 20:11:20 +0800 Subject: [PATCH] fix: update `exports` field in package.json files (#6550) --- packages/eslint-plugin-tslint/package.json | 6 ++---- packages/eslint-plugin/package.json | 8 +++----- packages/parser/package.json | 6 ++---- packages/scope-manager/package.json | 8 +++----- packages/type-utils/package.json | 6 ++---- packages/types/package.json | 6 ++---- packages/typescript-estree/package.json | 12 +++++------- packages/utils/package.json | 16 +++++++--------- packages/visitor-keys/package.json | 8 +++----- packages/website-eslint/package.json | 2 +- 10 files changed, 30 insertions(+), 48 deletions(-) diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 45af2e13763..6d3ab0312be 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -12,11 +12,9 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "require": "./dist/index.js" + "default": "./dist/index.js" }, - "./package.json": { - "require": "./package.json" - } + "./package.json": "./package.json" }, "engines": { "node": "^14.18.0 || ^16.0.0 || >=18.0.0" diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index f896351a63f..05a95f8893f 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -14,14 +14,12 @@ "exports": { ".": { "types": "./index.d.ts", - "require": "./dist/index.js" - }, - "./package.json": { - "require": "./package.json" + "default": "./dist/index.js" }, + "./package.json": "./package.json", "./use-at-your-own-risk/rules": { "types": "./rules.d.ts", - "require": "./dist/rules/index.js" + "default": "./dist/rules/index.js" } }, "engines": { diff --git a/packages/parser/package.json b/packages/parser/package.json index f6ac23928f1..86af3e30354 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -12,11 +12,9 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "require": "./dist/index.js" + "default": "./dist/index.js" }, - "./package.json": { - "require": "./package.json" - } + "./package.json": "./package.json" }, "engines": { "node": "^14.18.0 || ^16.0.0 || >=18.0.0" diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index c1424626834..8015f1e7294 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -12,14 +12,12 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "require": "./dist/index.js" - }, - "./package.json": { - "require": "./package.json" + "default": "./dist/index.js" }, + "./package.json": "./package.json", "./use-at-your-own-risk/analyze": { "types": "./dist/analyze.d.ts", - "require": "./dist/analyze.js" + "default": "./dist/analyze.js" } }, "engines": { diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index f1b9a9aa2ca..2d85dfcd469 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -13,11 +13,9 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "require": "./dist/index.js" + "default": "./dist/index.js" }, - "./package.json": { - "require": "./package.json" - } + "./package.json": "./package.json" }, "engines": { "node": "^14.18.0 || ^16.0.0 || >=18.0.0" diff --git a/packages/types/package.json b/packages/types/package.json index f890f0e5a5f..aa9a083e0e5 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -13,11 +13,9 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "require": "./dist/index.js" + "default": "./dist/index.js" }, - "./package.json": { - "require": "./package.json" - } + "./package.json": "./package.json" }, "engines": { "node": "^14.18.0 || ^16.0.0 || >=18.0.0" diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 6f8e938f5f8..dd2f6cdb992 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -12,22 +12,20 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "require": "./dist/index.js" - }, - "./package.json": { - "require": "./package.json" + "default": "./dist/index.js" }, + "./package.json": "./package.json", "./use-at-your-own-risk/ast-converter": { "types": "./dist/ast-converter.d.ts", - "require": "./dist/ast-converter.js" + "default": "./dist/ast-converter.js" }, "./use-at-your-own-risk/parseSettings": { "types": "./dist/parseSettings/index.d.ts", - "require": "./dist/parseSettings/index.js" + "default": "./dist/parseSettings/index.js" }, "./use-at-your-own-risk/getScriptKind": { "types": "./dist/create-program/getScriptKind.d.ts", - "require": "./dist/create-program/getScriptKind.js" + "default": "./dist/create-program/getScriptKind.js" } }, "engines": { diff --git a/packages/utils/package.json b/packages/utils/package.json index 94bf0620029..cfb8b841cc7 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -13,31 +13,29 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "require": "./dist/index.js" + "default": "./dist/index.js" }, "./ast-utils": { "types": "./dist/ast-utils/index.d.ts", - "require": "./dist/ast-utils/index.js" + "default": "./dist/ast-utils/index.js" }, "./eslint-utils": { "types": "./dist/eslint-utils/index.d.ts", - "require": "./dist/eslint-utils/index.js" + "default": "./dist/eslint-utils/index.js" }, "./eslint-utils/rule-tester": { "types": "./dist/eslint-utils/rule-tester/RuleTester.d.ts", - "require": "./dist/eslint-utils/rule-tester/RuleTester.js" + "default": "./dist/eslint-utils/rule-tester/RuleTester.js" }, "./json-schema": { "types": "./dist/json-schema.d.ts", - "require": "./dist/json-schema.js" + "default": "./dist/json-schema.js" }, "./ts-eslint": { "types": "./dist/ts-eslint/index.d.ts", - "require": "./dist/ts-eslint/index.js" + "default": "./dist/ts-eslint/index.js" }, - "./package.json": { - "require": "./package.json" - } + "./package.json": "./package.json" }, "engines": { "node": "^14.18.0 || ^16.0.0 || >=18.0.0" diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 42cec2fab29..e6c5adc8cd6 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -13,14 +13,12 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "require": "./dist/index.js" - }, - "./package.json": { - "require": "./package.json" + "default": "./dist/index.js" }, + "./package.json": "./package.json", "./use-at-your-own-risk/visitor-keys": { "types": "./dist/visitor-keys.d.ts", - "require": "./dist/visitor-keys.js" + "default": "./dist/visitor-keys.js" } }, "engines": { diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index 87d55dc395c..e0c0c5afc27 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -10,7 +10,7 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "require": "./dist/index.js" + "default": "./dist/index.js" } }, "engines": {