@storm-software/eslint 0.170.147 → 0.170.148

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.d.cts CHANGED
@@ -857,6 +857,26 @@ Backward pagination arguments
857
857
  * @deprecated
858
858
  */
859
859
  'brace-style'?: Linter.RuleEntry<BraceStyle>
860
+ /**
861
+ * Enforce using "catalog:" in `package.json` and write versions to the Bun workspace root catalog
862
+ * @see https://docs.stormsoftware.com/projects/storm-ops/eslint-plugin-bun/rules/json-enforce-catalog.md
863
+ */
864
+ 'bun/json-enforce-catalog'?: Linter.RuleEntry<BunJsonEnforceCatalog>
865
+ /**
866
+ * Disallow duplicate catalog items in the Bun workspace root `package.json`
867
+ * @see https://docs.stormsoftware.com/projects/storm-ops/eslint-plugin-bun/rules/json-no-duplicate-catalog-item.md
868
+ */
869
+ 'bun/json-no-duplicate-catalog-item'?: Linter.RuleEntry<BunJsonNoDuplicateCatalogItem>
870
+ /**
871
+ * Disallow unused catalog items in the Bun workspace root `package.json`
872
+ * @see https://docs.stormsoftware.com/projects/storm-ops/eslint-plugin-bun/rules/json-no-unused-catalog-item.md
873
+ */
874
+ 'bun/json-no-unused-catalog-item'?: Linter.RuleEntry<[]>
875
+ /**
876
+ * Enforce using valid Bun catalog references in `package.json`
877
+ * @see https://docs.stormsoftware.com/projects/storm-ops/eslint-plugin-bun/rules/json-valid-catalog.md
878
+ */
879
+ 'bun/json-valid-catalog'?: Linter.RuleEntry<BunJsonValidCatalog>
860
880
  /**
861
881
  * Require `return` statements after callbacks
862
882
  * @see https://eslint.org/docs/latest/rules/callback-return
@@ -8685,6 +8705,38 @@ type BlockSpacing = []|[("always" | "never")]
8685
8705
  type BraceStyle = []|[("1tbs" | "stroustrup" | "allman")]|[("1tbs" | "stroustrup" | "allman"), {
8686
8706
  allowSingleLine?: boolean
8687
8707
  }]
8708
+ // ----- bun/json-enforce-catalog -----
8709
+ type BunJsonEnforceCatalog = []|[{
8710
+
8711
+ allowedProtocols?: string[]
8712
+
8713
+ autofix?: boolean
8714
+
8715
+ defaultCatalog?: string
8716
+
8717
+ reuseExistingCatalog?: boolean
8718
+
8719
+ conflicts?: ("new-catalog" | "overrides" | "error")
8720
+
8721
+ fields?: string[]
8722
+
8723
+ ignore?: string[]
8724
+ }]
8725
+ // ----- bun/json-no-duplicate-catalog-item -----
8726
+ type BunJsonNoDuplicateCatalogItem = []|[{
8727
+ allow?: string[]
8728
+ }]
8729
+ // ----- bun/json-valid-catalog -----
8730
+ type BunJsonValidCatalog = []|[{
8731
+
8732
+ autoInsert?: boolean
8733
+
8734
+ autoInsertDefaultSpecifier?: string
8735
+
8736
+ autofix?: boolean
8737
+
8738
+ fields?: unknown[]
8739
+ }]
8688
8740
  // ----- callback-return -----
8689
8741
  type CallbackReturn = []|[string[]]
8690
8742
  // ----- camelcase -----
@@ -18637,7 +18689,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
18637
18689
  }]
18638
18690
 
18639
18691
  // Names of all the configs
18640
- type ConfigNames = "storm/banner" | "storm/cspell/rules" | "storm/astro/setup" | "storm/astro/rules" | "storm/formatter/setup" | "storm/imports/rules" | "storm/graphql/setup" | "storm/graphql/rules" | "storm/graphql/relay" | "storm/javascript/setup" | "storm/javascript/rules" | "storm/jsx/rules" | "storm/jsdoc/rules" | "storm/jsonc/setup" | "storm/jsonc/rules" | "storm/markdown/setup" | "storm/markdown/rules" | "mdx/flat" | "storm/node/rules" | "storm/nx/setup" | "storm/nx/schema" | "storm/nx/dependency-check" | "storm/nx/module-boundaries" | "storm/next/rules" | "storm/prettier" | "storm/perfectionist/rules" | "storm/pnpm/setup" | "storm/pnpm/package-json" | "storm/pnpm/pnpm-workspace-yaml" | "storm/react/setup" | "storm/react/rules" | "storm/react-native/rules" | "storm/sort/package-json" | "storm/stylistic/rules" | "storm/secrets/rules" | "storm/storybook/setup" | "storm/storybook/rules" | "storm/storybook/main" | "storm/test/setup" | "storm/test/rules" | "storm/tsdoc/rules" | "storm/toml/setup" | "storm/toml/rules" | "storm/typescript/setup" | "storm/typescript/parser" | "storm/typescript/type-aware-parser" | "storm/typescript/rules" | "storm/typescript/rules-type-aware" | "storm/regexp/rules" | "storm/unicorn/rules" | "storm/unocss" | "storm/yaml/setup" | "storm/yaml/rules" | "storm/zod/rules"
18692
+ type ConfigNames = "storm/banner" | "storm/bun/setup" | "bun/recommended/package-json" | "bun/recommended/package-json" | "storm/cspell/rules" | "storm/astro/setup" | "storm/astro/rules" | "storm/formatter/setup" | "storm/imports/rules" | "storm/graphql/setup" | "storm/graphql/rules" | "storm/graphql/relay" | "storm/javascript/setup" | "storm/javascript/rules" | "storm/jsx/rules" | "storm/jsdoc/rules" | "storm/jsonc/setup" | "storm/jsonc/rules" | "storm/markdown/setup" | "storm/markdown/rules" | "mdx/flat" | "storm/node/rules" | "storm/nx/setup" | "storm/nx/schema" | "storm/nx/dependency-check" | "storm/nx/module-boundaries" | "storm/next/rules" | "storm/prettier" | "storm/perfectionist/rules" | "storm/pnpm/setup" | "storm/pnpm/package-json" | "storm/pnpm/pnpm-workspace-yaml" | "storm/react/setup" | "storm/react/rules" | "storm/react-native/rules" | "storm/sort/package-json" | "storm/stylistic/rules" | "storm/secrets/rules" | "storm/storybook/setup" | "storm/storybook/rules" | "storm/storybook/main" | "storm/test/setup" | "storm/test/rules" | "storm/tsdoc/rules" | "storm/toml/setup" | "storm/toml/rules" | "storm/typescript/setup" | "storm/typescript/parser" | "storm/typescript/type-aware-parser" | "storm/typescript/rules" | "storm/typescript/rules-type-aware" | "storm/regexp/rules" | "storm/unicorn/rules" | "storm/unocss" | "storm/yaml/setup" | "storm/yaml/rules" | "storm/zod/rules"
18641
18693
 
18642
18694
  /**
18643
18695
  * Vendor types from Prettier so we don't rely on the dependency.
@@ -19199,6 +19251,20 @@ interface OptionsPnpm extends OptionsOverrides {
19199
19251
  */
19200
19252
  ignoreWorkspaceDeps?: boolean;
19201
19253
  }
19254
+ interface OptionsBun extends OptionsOverrides {
19255
+ /**
19256
+ * A list of dependencies to ignore for the `bun/json-enforce-catalog` rule.
19257
+ *
19258
+ * @defaultValue ["typescript"]
19259
+ */
19260
+ ignore?: string[];
19261
+ /**
19262
+ * Should local workspace dependencies be ignored by the `bun/json-enforce-catalog` rule.
19263
+ *
19264
+ * @defaultValue true
19265
+ */
19266
+ ignoreWorkspaceDeps?: boolean;
19267
+ }
19202
19268
  interface OptionsCSpell extends OptionsOverrides {
19203
19269
  /**
19204
19270
  * A path to a CSpell configuration file
@@ -19269,11 +19335,31 @@ interface OptionsConfig extends OptionsComponentExts, OptionsJavascript, Options
19269
19335
  /**
19270
19336
  * Enable PNPM related rules.
19271
19337
  *
19338
+ * Requires installing:
19339
+ * - `@storm-software/eslint-plugin-pnpm`
19340
+ *
19341
+ * @remarks
19342
+ * If the package manager is detected to be Bun, this option will be disabled.
19343
+ *
19272
19344
  * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm
19273
19345
  *
19274
19346
  * @defaultValue true
19275
19347
  */
19276
19348
  pnpm?: boolean | OptionsPnpm;
19349
+ /**
19350
+ * Enable Bun related rules.
19351
+ *
19352
+ * Requires installing:
19353
+ * - `@storm-software/eslint-plugin-bun`
19354
+ *
19355
+ * @remarks
19356
+ * If the package manager is detected to be PNPM, this option will be disabled.
19357
+ *
19358
+ * @see https://github.com/oven-sh/bun-plugin-eslint
19359
+ *
19360
+ * @defaultValue false
19361
+ */
19362
+ bun?: boolean | OptionsBun;
19277
19363
  /**
19278
19364
  * Enable JSX related rules.
19279
19365
  *
@@ -19448,4 +19534,4 @@ type UserConfig = Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatCo
19448
19534
  type PresetConfig<TOptions> = TOptions & Omit<TypedFlatConfigItem, "files">;
19449
19535
  type PresetResult = FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
19450
19536
 
19451
- export type { Awaitable, ConfigNames, ESLintGlobalsPropValue, OptionsBanner, OptionsCSpell, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsGraphQL, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSDoc, OptionsJavascript, OptionsNext, OptionsNx, OptionsNxDependencyChecks, OptionsNxEnforceModuleBoundaries, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStorybook, OptionsStylistic, OptionsTSDoc, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, PresetConfig, PresetResult, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem, UserConfig };
19537
+ export type { Awaitable, ConfigNames, ESLintGlobalsPropValue, OptionsBanner, OptionsBun, OptionsCSpell, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsGraphQL, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSDoc, OptionsJavascript, OptionsNext, OptionsNx, OptionsNxDependencyChecks, OptionsNxEnforceModuleBoundaries, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStorybook, OptionsStylistic, OptionsTSDoc, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, PresetConfig, PresetResult, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem, UserConfig };
package/dist/types.d.ts CHANGED
@@ -857,6 +857,26 @@ Backward pagination arguments
857
857
  * @deprecated
858
858
  */
859
859
  'brace-style'?: Linter.RuleEntry<BraceStyle>
860
+ /**
861
+ * Enforce using "catalog:" in `package.json` and write versions to the Bun workspace root catalog
862
+ * @see https://docs.stormsoftware.com/projects/storm-ops/eslint-plugin-bun/rules/json-enforce-catalog.md
863
+ */
864
+ 'bun/json-enforce-catalog'?: Linter.RuleEntry<BunJsonEnforceCatalog>
865
+ /**
866
+ * Disallow duplicate catalog items in the Bun workspace root `package.json`
867
+ * @see https://docs.stormsoftware.com/projects/storm-ops/eslint-plugin-bun/rules/json-no-duplicate-catalog-item.md
868
+ */
869
+ 'bun/json-no-duplicate-catalog-item'?: Linter.RuleEntry<BunJsonNoDuplicateCatalogItem>
870
+ /**
871
+ * Disallow unused catalog items in the Bun workspace root `package.json`
872
+ * @see https://docs.stormsoftware.com/projects/storm-ops/eslint-plugin-bun/rules/json-no-unused-catalog-item.md
873
+ */
874
+ 'bun/json-no-unused-catalog-item'?: Linter.RuleEntry<[]>
875
+ /**
876
+ * Enforce using valid Bun catalog references in `package.json`
877
+ * @see https://docs.stormsoftware.com/projects/storm-ops/eslint-plugin-bun/rules/json-valid-catalog.md
878
+ */
879
+ 'bun/json-valid-catalog'?: Linter.RuleEntry<BunJsonValidCatalog>
860
880
  /**
861
881
  * Require `return` statements after callbacks
862
882
  * @see https://eslint.org/docs/latest/rules/callback-return
@@ -8685,6 +8705,38 @@ type BlockSpacing = []|[("always" | "never")]
8685
8705
  type BraceStyle = []|[("1tbs" | "stroustrup" | "allman")]|[("1tbs" | "stroustrup" | "allman"), {
8686
8706
  allowSingleLine?: boolean
8687
8707
  }]
8708
+ // ----- bun/json-enforce-catalog -----
8709
+ type BunJsonEnforceCatalog = []|[{
8710
+
8711
+ allowedProtocols?: string[]
8712
+
8713
+ autofix?: boolean
8714
+
8715
+ defaultCatalog?: string
8716
+
8717
+ reuseExistingCatalog?: boolean
8718
+
8719
+ conflicts?: ("new-catalog" | "overrides" | "error")
8720
+
8721
+ fields?: string[]
8722
+
8723
+ ignore?: string[]
8724
+ }]
8725
+ // ----- bun/json-no-duplicate-catalog-item -----
8726
+ type BunJsonNoDuplicateCatalogItem = []|[{
8727
+ allow?: string[]
8728
+ }]
8729
+ // ----- bun/json-valid-catalog -----
8730
+ type BunJsonValidCatalog = []|[{
8731
+
8732
+ autoInsert?: boolean
8733
+
8734
+ autoInsertDefaultSpecifier?: string
8735
+
8736
+ autofix?: boolean
8737
+
8738
+ fields?: unknown[]
8739
+ }]
8688
8740
  // ----- callback-return -----
8689
8741
  type CallbackReturn = []|[string[]]
8690
8742
  // ----- camelcase -----
@@ -18637,7 +18689,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
18637
18689
  }]
18638
18690
 
18639
18691
  // Names of all the configs
18640
- type ConfigNames = "storm/banner" | "storm/cspell/rules" | "storm/astro/setup" | "storm/astro/rules" | "storm/formatter/setup" | "storm/imports/rules" | "storm/graphql/setup" | "storm/graphql/rules" | "storm/graphql/relay" | "storm/javascript/setup" | "storm/javascript/rules" | "storm/jsx/rules" | "storm/jsdoc/rules" | "storm/jsonc/setup" | "storm/jsonc/rules" | "storm/markdown/setup" | "storm/markdown/rules" | "mdx/flat" | "storm/node/rules" | "storm/nx/setup" | "storm/nx/schema" | "storm/nx/dependency-check" | "storm/nx/module-boundaries" | "storm/next/rules" | "storm/prettier" | "storm/perfectionist/rules" | "storm/pnpm/setup" | "storm/pnpm/package-json" | "storm/pnpm/pnpm-workspace-yaml" | "storm/react/setup" | "storm/react/rules" | "storm/react-native/rules" | "storm/sort/package-json" | "storm/stylistic/rules" | "storm/secrets/rules" | "storm/storybook/setup" | "storm/storybook/rules" | "storm/storybook/main" | "storm/test/setup" | "storm/test/rules" | "storm/tsdoc/rules" | "storm/toml/setup" | "storm/toml/rules" | "storm/typescript/setup" | "storm/typescript/parser" | "storm/typescript/type-aware-parser" | "storm/typescript/rules" | "storm/typescript/rules-type-aware" | "storm/regexp/rules" | "storm/unicorn/rules" | "storm/unocss" | "storm/yaml/setup" | "storm/yaml/rules" | "storm/zod/rules"
18692
+ type ConfigNames = "storm/banner" | "storm/bun/setup" | "bun/recommended/package-json" | "bun/recommended/package-json" | "storm/cspell/rules" | "storm/astro/setup" | "storm/astro/rules" | "storm/formatter/setup" | "storm/imports/rules" | "storm/graphql/setup" | "storm/graphql/rules" | "storm/graphql/relay" | "storm/javascript/setup" | "storm/javascript/rules" | "storm/jsx/rules" | "storm/jsdoc/rules" | "storm/jsonc/setup" | "storm/jsonc/rules" | "storm/markdown/setup" | "storm/markdown/rules" | "mdx/flat" | "storm/node/rules" | "storm/nx/setup" | "storm/nx/schema" | "storm/nx/dependency-check" | "storm/nx/module-boundaries" | "storm/next/rules" | "storm/prettier" | "storm/perfectionist/rules" | "storm/pnpm/setup" | "storm/pnpm/package-json" | "storm/pnpm/pnpm-workspace-yaml" | "storm/react/setup" | "storm/react/rules" | "storm/react-native/rules" | "storm/sort/package-json" | "storm/stylistic/rules" | "storm/secrets/rules" | "storm/storybook/setup" | "storm/storybook/rules" | "storm/storybook/main" | "storm/test/setup" | "storm/test/rules" | "storm/tsdoc/rules" | "storm/toml/setup" | "storm/toml/rules" | "storm/typescript/setup" | "storm/typescript/parser" | "storm/typescript/type-aware-parser" | "storm/typescript/rules" | "storm/typescript/rules-type-aware" | "storm/regexp/rules" | "storm/unicorn/rules" | "storm/unocss" | "storm/yaml/setup" | "storm/yaml/rules" | "storm/zod/rules"
18641
18693
 
18642
18694
  /**
18643
18695
  * Vendor types from Prettier so we don't rely on the dependency.
@@ -19199,6 +19251,20 @@ interface OptionsPnpm extends OptionsOverrides {
19199
19251
  */
19200
19252
  ignoreWorkspaceDeps?: boolean;
19201
19253
  }
19254
+ interface OptionsBun extends OptionsOverrides {
19255
+ /**
19256
+ * A list of dependencies to ignore for the `bun/json-enforce-catalog` rule.
19257
+ *
19258
+ * @defaultValue ["typescript"]
19259
+ */
19260
+ ignore?: string[];
19261
+ /**
19262
+ * Should local workspace dependencies be ignored by the `bun/json-enforce-catalog` rule.
19263
+ *
19264
+ * @defaultValue true
19265
+ */
19266
+ ignoreWorkspaceDeps?: boolean;
19267
+ }
19202
19268
  interface OptionsCSpell extends OptionsOverrides {
19203
19269
  /**
19204
19270
  * A path to a CSpell configuration file
@@ -19269,11 +19335,31 @@ interface OptionsConfig extends OptionsComponentExts, OptionsJavascript, Options
19269
19335
  /**
19270
19336
  * Enable PNPM related rules.
19271
19337
  *
19338
+ * Requires installing:
19339
+ * - `@storm-software/eslint-plugin-pnpm`
19340
+ *
19341
+ * @remarks
19342
+ * If the package manager is detected to be Bun, this option will be disabled.
19343
+ *
19272
19344
  * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm
19273
19345
  *
19274
19346
  * @defaultValue true
19275
19347
  */
19276
19348
  pnpm?: boolean | OptionsPnpm;
19349
+ /**
19350
+ * Enable Bun related rules.
19351
+ *
19352
+ * Requires installing:
19353
+ * - `@storm-software/eslint-plugin-bun`
19354
+ *
19355
+ * @remarks
19356
+ * If the package manager is detected to be PNPM, this option will be disabled.
19357
+ *
19358
+ * @see https://github.com/oven-sh/bun-plugin-eslint
19359
+ *
19360
+ * @defaultValue false
19361
+ */
19362
+ bun?: boolean | OptionsBun;
19277
19363
  /**
19278
19364
  * Enable JSX related rules.
19279
19365
  *
@@ -19448,4 +19534,4 @@ type UserConfig = Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatCo
19448
19534
  type PresetConfig<TOptions> = TOptions & Omit<TypedFlatConfigItem, "files">;
19449
19535
  type PresetResult = FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
19450
19536
 
19451
- export type { Awaitable, ConfigNames, ESLintGlobalsPropValue, OptionsBanner, OptionsCSpell, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsGraphQL, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSDoc, OptionsJavascript, OptionsNext, OptionsNx, OptionsNxDependencyChecks, OptionsNxEnforceModuleBoundaries, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStorybook, OptionsStylistic, OptionsTSDoc, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, PresetConfig, PresetResult, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem, UserConfig };
19537
+ export type { Awaitable, ConfigNames, ESLintGlobalsPropValue, OptionsBanner, OptionsBun, OptionsCSpell, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsGraphQL, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSDoc, OptionsJavascript, OptionsNext, OptionsNx, OptionsNxDependencyChecks, OptionsNxEnforceModuleBoundaries, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStorybook, OptionsStylistic, OptionsTSDoc, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, PresetConfig, PresetResult, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem, UserConfig };
package/dist/types.js CHANGED
@@ -1,4 +1,4 @@
1
- import { init_esm_shims } from './chunk-KKSKXDKN.js';
1
+ import { init_esm_shims } from './chunk-V2FABXKB.js';
2
2
 
3
3
  // src/types.ts
4
4
  init_esm_shims();
@@ -1,4 +1,4 @@
1
- import { init_esm_shims } from '../chunk-KKSKXDKN.js';
1
+ import { init_esm_shims } from '../chunk-V2FABXKB.js';
2
2
 
3
3
  // src/utils/combine.ts
4
4
  init_esm_shims();
@@ -1,2 +1,2 @@
1
- export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from '../chunk-AQ6O65DK.js';
2
- import '../chunk-KKSKXDKN.js';
1
+ export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from '../chunk-2GBBEPXG.js';
2
+ import '../chunk-V2FABXKB.js';
@@ -1,3 +1,3 @@
1
- export { findWorkspaceRoot, findWorkspaceRootSafe } from '../chunk-E2NGV25P.js';
2
- import '../chunk-AQ6O65DK.js';
3
- import '../chunk-KKSKXDKN.js';
1
+ export { findWorkspaceRoot, findWorkspaceRootSafe } from '../chunk-TXQW75XG.js';
2
+ import '../chunk-2GBBEPXG.js';
3
+ import '../chunk-V2FABXKB.js';
@@ -1,4 +1,4 @@
1
- import { init_esm_shims } from '../chunk-KKSKXDKN.js';
1
+ import { init_esm_shims } from '../chunk-V2FABXKB.js';
2
2
 
3
3
  // src/utils/format-config.ts
4
4
  init_esm_shims();
@@ -8,7 +8,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
8
 
9
9
  var process__default = /*#__PURE__*/_interopDefault(process);
10
10
 
11
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=a9def7e06ce25c19654987ab91979289197bf4d3e7e124c514a4487c3e8d68c6__34476a48d239a0e11c9f4ce115b72fa9/node_modules/tsup/assets/cjs_shims.js
11
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=a9def7e06ce25c19654987ab91979289197bf4d3e7e124c514a4487c3e8d68c6__4c7f198c1bf00acf5c8c3547cc3821dd/node_modules/tsup/assets/cjs_shims.js
12
12
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
13
13
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
14
14
  var scopeUrl = url.fileURLToPath(new URL(".", importMetaUrl));
@@ -1,2 +1,2 @@
1
- export { ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, renameRules } from '../chunk-3TEXQ75B.js';
2
- import '../chunk-KKSKXDKN.js';
1
+ export { ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, renameRules } from '../chunk-S3KJ56KD.js';
2
+ import '../chunk-V2FABXKB.js';
@@ -0,0 +1,199 @@
1
+ 'use strict';
2
+
3
+ var fs = require('fs');
4
+ var path = require('path');
5
+
6
+ // src/utils/package-manager.ts
7
+
8
+ // src/utils/correct-paths.ts
9
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
10
+ function normalizeWindowsPath(input = "") {
11
+ if (!input) {
12
+ return input;
13
+ }
14
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
15
+ }
16
+ var _UNC_REGEX = /^[/\\]{2}/;
17
+ var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
18
+ var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
19
+ var correctPaths = function(path) {
20
+ if (!path || path.length === 0) {
21
+ return ".";
22
+ }
23
+ path = normalizeWindowsPath(path);
24
+ const isUNCPath = path.match(_UNC_REGEX);
25
+ const isPathAbsolute = isAbsolute(path);
26
+ const trailingSeparator = path[path.length - 1] === "/";
27
+ path = normalizeString(path, !isPathAbsolute);
28
+ if (path.length === 0) {
29
+ if (isPathAbsolute) {
30
+ return "/";
31
+ }
32
+ return trailingSeparator ? "./" : ".";
33
+ }
34
+ if (trailingSeparator) {
35
+ path += "/";
36
+ }
37
+ if (_DRIVE_LETTER_RE.test(path)) {
38
+ path += "/";
39
+ }
40
+ if (isUNCPath) {
41
+ if (!isPathAbsolute) {
42
+ return `//./${path}`;
43
+ }
44
+ return `//${path}`;
45
+ }
46
+ return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
47
+ };
48
+ function normalizeString(path, allowAboveRoot) {
49
+ let res = "";
50
+ let lastSegmentLength = 0;
51
+ let lastSlash = -1;
52
+ let dots = 0;
53
+ let char = null;
54
+ for (let index = 0; index <= path.length; ++index) {
55
+ if (index < path.length) {
56
+ char = path[index];
57
+ } else if (char === "/") {
58
+ break;
59
+ } else {
60
+ char = "/";
61
+ }
62
+ if (char === "/") {
63
+ if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
64
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
65
+ if (res.length > 2) {
66
+ const lastSlashIndex = res.lastIndexOf("/");
67
+ if (lastSlashIndex === -1) {
68
+ res = "";
69
+ lastSegmentLength = 0;
70
+ } else {
71
+ res = res.slice(0, lastSlashIndex);
72
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
73
+ }
74
+ lastSlash = index;
75
+ dots = 0;
76
+ continue;
77
+ } else if (res.length > 0) {
78
+ res = "";
79
+ lastSegmentLength = 0;
80
+ lastSlash = index;
81
+ dots = 0;
82
+ continue;
83
+ }
84
+ }
85
+ if (allowAboveRoot) {
86
+ res += res.length > 0 ? "/.." : "..";
87
+ lastSegmentLength = 2;
88
+ }
89
+ } else {
90
+ if (res.length > 0) {
91
+ res += `/${path.slice(lastSlash + 1, index)}`;
92
+ } else {
93
+ res = path.slice(lastSlash + 1, index);
94
+ }
95
+ lastSegmentLength = index - lastSlash - 1;
96
+ }
97
+ lastSlash = index;
98
+ dots = 0;
99
+ } else if (char === "." && dots !== -1) {
100
+ ++dots;
101
+ } else {
102
+ dots = -1;
103
+ }
104
+ }
105
+ return res;
106
+ }
107
+ var isAbsolute = function(p) {
108
+ return _IS_ABSOLUTE_RE.test(p);
109
+ };
110
+
111
+ // src/utils/find-workspace-root.ts
112
+ var MAX_PATH_SEARCH_DEPTH = 30;
113
+ var depth = 0;
114
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
115
+ const _startPath = startPath ?? process.cwd();
116
+ if (endDirectoryNames.some(
117
+ (endDirName) => fs.existsSync(path.join(_startPath, endDirName))
118
+ )) {
119
+ return _startPath;
120
+ }
121
+ if (endFileNames.some((endFileName) => fs.existsSync(path.join(_startPath, endFileName)))) {
122
+ return _startPath;
123
+ }
124
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
125
+ const parent = path.join(_startPath, "..");
126
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
127
+ }
128
+ return void 0;
129
+ }
130
+ var rootFiles = [
131
+ "storm-workspace.json",
132
+ "storm-workspace.json",
133
+ "storm-workspace.yaml",
134
+ "storm-workspace.yml",
135
+ "storm-workspace.js",
136
+ "storm-workspace.ts",
137
+ ".storm-workspace.json",
138
+ ".storm-workspace.yaml",
139
+ ".storm-workspace.yml",
140
+ ".storm-workspace.js",
141
+ ".storm-workspace.ts",
142
+ "lerna.json",
143
+ "nx.json",
144
+ "turbo.json",
145
+ "npm-workspace.json",
146
+ "yarn-workspace.json",
147
+ "pnpm-workspace.json",
148
+ "npm-workspace.yaml",
149
+ "yarn-workspace.yaml",
150
+ "pnpm-workspace.yaml",
151
+ "npm-workspace.yml",
152
+ "yarn-workspace.yml",
153
+ "pnpm-workspace.yml",
154
+ "npm-lock.json",
155
+ "yarn-lock.json",
156
+ "pnpm-lock.json",
157
+ "npm-lock.yaml",
158
+ "yarn-lock.yaml",
159
+ "pnpm-lock.yaml",
160
+ "npm-lock.yml",
161
+ "yarn-lock.yml",
162
+ "pnpm-lock.yml",
163
+ "bun.lockb"
164
+ ];
165
+ var rootDirectories = [
166
+ ".storm-workspace",
167
+ ".nx",
168
+ ".github",
169
+ ".vscode",
170
+ ".verdaccio"
171
+ ];
172
+ function findWorkspaceRootSafe(pathInsideMonorepo) {
173
+ if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
174
+ return correctPaths(
175
+ process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
176
+ );
177
+ }
178
+ return correctPaths(
179
+ findFolderUp(
180
+ process.cwd(),
181
+ rootFiles,
182
+ rootDirectories
183
+ )
184
+ );
185
+ }
186
+
187
+ // src/utils/package-manager.ts
188
+ function detectPackageManager() {
189
+ const workspaceRoot = findWorkspaceRootSafe() ?? process.cwd();
190
+ if (fs.existsSync(path.join(workspaceRoot, "bun.lockb")) || fs.existsSync(path.join(workspaceRoot, "bun.lock")) || fs.existsSync(path.join(workspaceRoot, "bunfig.toml")) || fs.existsSync(path.join(workspaceRoot, "bunfig.yml"))) {
191
+ return "bun";
192
+ }
193
+ if (fs.existsSync(path.join(workspaceRoot, "pnpm-lock.yaml")) || fs.existsSync(path.join(workspaceRoot, "pnpm-lock.yml")) || fs.existsSync(path.join(workspaceRoot, "pnpm-workpace.yaml"))) {
194
+ return "pnpm";
195
+ }
196
+ return "npm";
197
+ }
198
+
199
+ exports.detectPackageManager = detectPackageManager;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Detect the package manager used in the workspace.
3
+ *
4
+ * @returns "pnpm" | "bun" | "npm"
5
+ */
6
+ declare function detectPackageManager(): "pnpm" | "bun" | "npm";
7
+
8
+ export { detectPackageManager };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Detect the package manager used in the workspace.
3
+ *
4
+ * @returns "pnpm" | "bun" | "npm"
5
+ */
6
+ declare function detectPackageManager(): "pnpm" | "bun" | "npm";
7
+
8
+ export { detectPackageManager };
@@ -0,0 +1,4 @@
1
+ export { detectPackageManager } from '../chunk-YQLFHRZH.js';
2
+ import '../chunk-TXQW75XG.js';
3
+ import '../chunk-2GBBEPXG.js';
4
+ import '../chunk-V2FABXKB.js';
@@ -1,4 +1,4 @@
1
- export { checkTsConfigPath, getTsConfigPath } from '../chunk-EEYALP2Y.js';
2
- import '../chunk-E2NGV25P.js';
3
- import '../chunk-AQ6O65DK.js';
4
- import '../chunk-KKSKXDKN.js';
1
+ export { checkTsConfigPath, getTsConfigPath } from '../chunk-IANE44ON.js';
2
+ import '../chunk-TXQW75XG.js';
3
+ import '../chunk-2GBBEPXG.js';
4
+ import '../chunk-V2FABXKB.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.170.147",
3
+ "version": "0.170.148",
4
4
  "private": false,
5
5
  "description": "A package containing the base ESLint configuration used by Storm Software across many projects.",
6
6
  "keywords": [
@@ -129,9 +129,9 @@
129
129
  "@eslint/eslintrc": "^3.3.6",
130
130
  "@eslint/markdown": "^6.6.0",
131
131
  "@nx/eslint-plugin": "23.1.1",
132
- "@storm-software/config": "1.138.50",
133
- "@storm-software/config-tools": "1.190.113",
134
- "@storm-software/package-constants": "0.1.126",
132
+ "@storm-software/config": "1.138.51",
133
+ "@storm-software/config-tools": "1.190.114",
134
+ "@storm-software/package-constants": "0.1.127",
135
135
  "@stylistic/eslint-plugin": "^4.4.1",
136
136
  "@typescript-eslint/eslint-plugin": "^8.66.0",
137
137
  "@typescript-eslint/parser": "^8.66.0",
@@ -185,10 +185,11 @@
185
185
  "@next/eslint-plugin-next": "^15.5.22",
186
186
  "@nx/eslint": "23.1.1",
187
187
  "@prettier/plugin-xml": "^3.4.2",
188
- "@storm-software/eslint-plugin-banner": "0.0.78",
189
- "@storm-software/eslint-plugin-pnpm": "0.0.76",
190
- "@storm-software/eslint-plugin-tsdoc": "0.0.76",
191
- "@storm-software/tsdoc": "0.13.266",
188
+ "@storm-software/eslint-plugin-banner": "0.0.79",
189
+ "@storm-software/eslint-plugin-bun": "0.0.2",
190
+ "@storm-software/eslint-plugin-pnpm": "0.0.77",
191
+ "@storm-software/eslint-plugin-tsdoc": "0.0.77",
192
+ "@storm-software/tsdoc": "0.13.267",
192
193
  "@stylistic/eslint-plugin-migrate": "^4.4.1",
193
194
  "@types/eslint": "^9.6.1",
194
195
  "@types/eslint__js": "^8.42.3",
@@ -213,7 +214,7 @@
213
214
  "minimatch": "^10.2.6",
214
215
  "prettier-plugin-astro": "^0.14.1",
215
216
  "tsup": "8.4.0",
216
- "tsx": "^4.23.5",
217
+ "tsx": "^4.23.7",
217
218
  "typescript": "^6.0.3",
218
219
  "zod": "^4.4.3"
219
220
  },
@@ -223,6 +224,8 @@
223
224
  "@next/eslint-plugin-next": "^15.2.0-canary.67",
224
225
  "@nx/eslint": ">=23.0.0",
225
226
  "@prettier/plugin-xml": "^3.4.1",
227
+ "@storm-software/eslint-plugin-bun": "*",
228
+ "@storm-software/eslint-plugin-pnpm": "*",
226
229
  "@storm-software/tsdoc": "*",
227
230
  "@unocss/eslint-plugin": ">=0.50.0",
228
231
  "astro-eslint-parser": "^1.0.2",
@@ -234,6 +237,7 @@
234
237
  "eslint-plugin-relay": "^1.8.3",
235
238
  "eslint-plugin-storybook": "^0.11.0",
236
239
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0",
240
+ "minimatch": "^10.2.5",
237
241
  "prettier-plugin-astro": "^0.14.0",
238
242
  "zod": "^3.25.0 || ^4.0.0"
239
243
  },
@@ -243,6 +247,8 @@
243
247
  "@next/eslint-plugin-next": { "optional": true },
244
248
  "@nx/eslint": { "optional": false },
245
249
  "@prettier/plugin-xml": { "optional": false },
250
+ "@storm-software/eslint-plugin-bun": { "optional": true },
251
+ "@storm-software/eslint-plugin-pnpm": { "optional": true },
246
252
  "@storm-software/tsdoc": { "optional": true },
247
253
  "@unocss/eslint-plugin": { "optional": true },
248
254
  "astro-eslint-parser": { "optional": true },
@@ -259,5 +265,5 @@
259
265
  "zod": { "optional": true }
260
266
  },
261
267
  "publishConfig": { "access": "public" },
262
- "gitHead": "c11ae2436e44e83c82a6562d0a8fc18cef58c475"
268
+ "gitHead": "37e2a4dcb02f87727a9de4428f910ba4d9c4524f"
263
269
  }