From edd46d19f0f73c4720b4b8e09c24e3d27ee5b325 Mon Sep 17 00:00:00 2001 From: Eli <88557639+lishaduck@users.noreply.github.com> Date: Sun, 29 Dec 2024 19:38:37 -0600 Subject: [PATCH] fix: build --- apps/docs-website/package.json | 2 +- apps/sheriff-webservices/package.json | 2 +- packages/eslint-config-sheriff/eslint.config.ts | 2 +- packages/eslint-config-sheriff/package.json | 2 +- packages/eslint-config-sheriff/src/index.ts | 11 +++++------ packages/sheriff-cli/package.json | 2 +- packages/sheriff-create-config/package.json | 2 +- packages/sheriff-types/package.json | 2 +- packages/tsconfig/base.json | 4 +++- 9 files changed, 15 insertions(+), 14 deletions(-) diff --git a/apps/docs-website/package.json b/apps/docs-website/package.json index c7711a09..2577fe1a 100644 --- a/apps/docs-website/package.json +++ b/apps/docs-website/package.json @@ -11,7 +11,7 @@ "serve": "docusaurus serve --dir=./dist", "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids", - "typecheck": "tsc --noEmit", + "typecheck": "tsc", "lint": "eslint --max-warnings=0 --flag unstable_ts_config", "typesync": "typesync --dry=fail", "clean": "pnpm clear && rm -rf .turbo dist node_modules/.cache" diff --git a/apps/sheriff-webservices/package.json b/apps/sheriff-webservices/package.json index b8724aad..a9840e28 100644 --- a/apps/sheriff-webservices/package.json +++ b/apps/sheriff-webservices/package.json @@ -6,7 +6,7 @@ "scripts": { "start": "tsx watch ./src/index.ts", "build": "tsc", - "typecheck": "tsc --noEmit", + "typecheck": "tsc", "lint": "eslint --max-warnings=0 --flag unstable_ts_config", "typesync": "typesync --dry=fail", "serve": "node ./dist/index.js", diff --git a/packages/eslint-config-sheriff/eslint.config.ts b/packages/eslint-config-sheriff/eslint.config.ts index 2c8d4666..692d2b87 100644 --- a/packages/eslint-config-sheriff/eslint.config.ts +++ b/packages/eslint-config-sheriff/eslint.config.ts @@ -1,5 +1,5 @@ -import { sheriff, type SheriffSettings } from 'eslint-config-sheriff'; import { defineFlatConfig } from 'eslint-define-config'; +import { sheriff, type SheriffSettings } from './src'; const sheriffOptions: SheriffSettings = { react: false, diff --git a/packages/eslint-config-sheriff/package.json b/packages/eslint-config-sheriff/package.json index 1b7fd411..ac54507a 100644 --- a/packages/eslint-config-sheriff/package.json +++ b/packages/eslint-config-sheriff/package.json @@ -50,7 +50,7 @@ "are-the-types-wrong": "attw --pack --profile=esm-only", "build": "tsup && pnpm re-bundle-types", "build-watch": "tsup && pnpm re-bundle-types", - "typecheck": "tsc --noEmit", + "typecheck": "tsc", "lint": "eslint src --max-warnings=0 --flag unstable_ts_config", "publint": "publint", "typesync": "typesync --dry=fail" diff --git a/packages/eslint-config-sheriff/src/index.ts b/packages/eslint-config-sheriff/src/index.ts index 2460ac4a..86ca0539 100644 --- a/packages/eslint-config-sheriff/src/index.ts +++ b/packages/eslint-config-sheriff/src/index.ts @@ -1,5 +1,4 @@ /* eslint-disable import/no-default-export */ -/* eslint-disable unicorn/prefer-export-from */ import { allJsExtensions, @@ -9,7 +8,6 @@ import { supportedFileTypes, testsFilePatterns, } from '@sherifforg/constants'; -import { getExportableConfig } from './getExportableConfig'; import { getIndexedBaseNoRestrictedSyntaxRules } from './utils/getIndexedBaseNoRestrictedSyntaxRules'; //#region - these '@sherifforg/constants' variables needs to be re-stored like this, otherwise they will not be bundled. They need to be bundled because we are not publishing the 'sheriff-constants' package, but we are using it as a dependency in this package. @@ -22,19 +20,20 @@ const exportableTestsFilePatterns = testsFilePatterns; const indexedBaseNoRestrictedSyntaxRules = getIndexedBaseNoRestrictedSyntaxRules(); -//#endregion export { exportableAllJsExtensions as allJsExtensions, exportableAllJsxExtensions as allJsxExtensions, indexedBaseNoRestrictedSyntaxRules as baseNoRestrictedSyntaxRules, exportableIgnores as ignores, - getExportableConfig as sheriff, exportableSheriffStartingOptions as sheriffStartingOptions, exportableSupportedFileTypes as supportedFileTypes, exportableTestsFilePatterns as testsFilePatterns, }; +//#endregion +export { + getExportableConfig as default, + getExportableConfig as sheriff, +} from './getExportableConfig'; export type * from '@sherifforg/types'; - -export default getExportableConfig; diff --git a/packages/sheriff-cli/package.json b/packages/sheriff-cli/package.json index 6863fc5d..7e5b38e1 100644 --- a/packages/sheriff-cli/package.json +++ b/packages/sheriff-cli/package.json @@ -6,7 +6,7 @@ "scripts": { "clean": "rm -rf .turbo dist node_modules/.cache", "build": "tsup", - "typecheck": "tsc --noEmit", + "typecheck": "tsc", "lint": "eslint ./src --max-warnings=0", "publint": "publint", "typesync": "typesync --dry=fail" diff --git a/packages/sheriff-create-config/package.json b/packages/sheriff-create-config/package.json index 9a18fa82..d43b6715 100644 --- a/packages/sheriff-create-config/package.json +++ b/packages/sheriff-create-config/package.json @@ -8,7 +8,7 @@ "clean": "rm -rf .turbo dist node_modules/.cache", "build": "tsup", "build-watch": "tsup", - "typecheck": "tsc --noEmit", + "typecheck": "tsc", "lint": "eslint ./src --max-warnings=0 --flag unstable_ts_config", "publint": "publint", "typesync": "typesync --dry=fail" diff --git a/packages/sheriff-types/package.json b/packages/sheriff-types/package.json index 11b39bfc..6b7df137 100644 --- a/packages/sheriff-types/package.json +++ b/packages/sheriff-types/package.json @@ -11,7 +11,7 @@ ], "scripts": { "clean": "rm -rf .turbo dist node_modules/.cache", - "typecheck": "tsc --noEmit" + "typecheck": "tsc" }, "devDependencies": { "@types/node": "^22.9.0", diff --git a/packages/tsconfig/base.json b/packages/tsconfig/base.json index a974e06b..36a6679a 100644 --- a/packages/tsconfig/base.json +++ b/packages/tsconfig/base.json @@ -8,6 +8,7 @@ "${configDir}/node_modules" ], "compilerOptions": { + "noEmit": true, "composite": false, "target": "ESNext", "module": "Preserve", @@ -23,6 +24,7 @@ "skipLibCheck": true, "verbatimModuleSyntax": true, "tsBuildInfoFile": "${configDir}/node_modules/.cache/tsbuildinfo.json", - "noUncheckedSideEffectImports": true + "noUncheckedSideEffectImports": true, + "allowImportingTsExtensions": true } }