@storm-software/eslint 0.170.85 → 0.170.87

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.
Files changed (3) hide show
  1. package/dist/preset.cjs +204 -23
  2. package/dist/preset.js +206 -22
  3. package/package.json +8 -14
package/dist/preset.cjs CHANGED
@@ -29,14 +29,14 @@ var braceExpansion = require('brace-expansion');
29
29
  var semver = require('semver');
30
30
  var isGlob = require('is-glob');
31
31
  var eslintUnsupportedApi = require('eslint/use-at-your-own-risk');
32
- var default5 = require('eslint-plugin-import-zod');
33
- var default6 = require('eslint-plugin-n');
34
- var default7 = require('eslint-plugin-no-only-tests');
35
- var default8 = require('eslint-plugin-no-secrets');
36
- var default9 = require('eslint-plugin-perfectionist');
37
- var default10 = require('eslint-plugin-prettier');
38
- var default11 = require('eslint-plugin-unicorn');
39
- var default12 = require('eslint-plugin-unused-imports');
32
+ var utils = require('@typescript-eslint/utils');
33
+ var default5 = require('eslint-plugin-n');
34
+ var default6 = require('eslint-plugin-no-only-tests');
35
+ var default7 = require('eslint-plugin-no-secrets');
36
+ var default8 = require('eslint-plugin-perfectionist');
37
+ var default9 = require('eslint-plugin-prettier');
38
+ var default10 = require('eslint-plugin-unicorn');
39
+ var default11 = require('eslint-plugin-unused-imports');
40
40
  var globalsLib = require('globals');
41
41
  var eslintMergeProcessors = require('eslint-merge-processors');
42
42
  var devkit = require('@nx/devkit');
@@ -90,7 +90,6 @@ var default8__default = /*#__PURE__*/_interopDefault(default8);
90
90
  var default9__default = /*#__PURE__*/_interopDefault(default9);
91
91
  var default10__default = /*#__PURE__*/_interopDefault(default10);
92
92
  var default11__default = /*#__PURE__*/_interopDefault(default11);
93
- var default12__default = /*#__PURE__*/_interopDefault(default12);
94
93
  var globalsLib__default = /*#__PURE__*/_interopDefault(globalsLib);
95
94
  var jsoncParser__namespace = /*#__PURE__*/_interopNamespace(jsoncParser);
96
95
  var yamlParser__namespace = /*#__PURE__*/_interopNamespace(yamlParser);
@@ -1302,6 +1301,56 @@ var require_no_single_element_style_arrays = __commonJS({
1302
1301
  }
1303
1302
  });
1304
1303
 
1304
+ // ../../node_modules/.pnpm/eslint-plugin-react-native-globals@0.1.2/node_modules/eslint-plugin-react-native-globals/index.js
1305
+ var require_eslint_plugin_react_native_globals = __commonJS({
1306
+ "../../node_modules/.pnpm/eslint-plugin-react-native-globals@0.1.2/node_modules/eslint-plugin-react-native-globals/index.js"(exports, module) {
1307
+ init_cjs_shims();
1308
+ var globals = {
1309
+ __DEV__: false,
1310
+ __dirname: false,
1311
+ alert: false,
1312
+ Blob: false,
1313
+ cancelAnimationFrame: false,
1314
+ cancelIdleCallback: false,
1315
+ clearImmediate: true,
1316
+ clearInterval: false,
1317
+ clearTimeout: false,
1318
+ console: false,
1319
+ escape: false,
1320
+ Event: false,
1321
+ EventTarget: false,
1322
+ exports: false,
1323
+ fetch: false,
1324
+ File: false,
1325
+ FileReader: false,
1326
+ FormData: false,
1327
+ global: false,
1328
+ Map: true,
1329
+ module: false,
1330
+ navigator: false,
1331
+ process: false,
1332
+ Promise: true,
1333
+ requestAnimationFrame: true,
1334
+ requestIdleCallback: true,
1335
+ require: false,
1336
+ Set: true,
1337
+ setImmediate: true,
1338
+ setInterval: false,
1339
+ setTimeout: false,
1340
+ WebSocket: false,
1341
+ window: false,
1342
+ XMLHttpRequest: false
1343
+ };
1344
+ module.exports = {
1345
+ environments: {
1346
+ all: {
1347
+ globals
1348
+ }
1349
+ }
1350
+ };
1351
+ }
1352
+ });
1353
+
1305
1354
  // ../../node_modules/.pnpm/eslint-plugin-react-native@5.0.0_patch_hash=1320a4c113a7f7ebb367bb0eaf377bd76dd7730f216_b81403553f777f68c7f42f6dd1713653/node_modules/eslint-plugin-react-native/index.js
1306
1355
  var require_eslint_plugin_react_native = __commonJS({
1307
1356
  "../../node_modules/.pnpm/eslint-plugin-react-native@5.0.0_patch_hash=1320a4c113a7f7ebb367bb0eaf377bd76dd7730f216_b81403553f777f68c7f42f6dd1713653/node_modules/eslint-plugin-react-native/index.js"(exports, module) {
@@ -1340,7 +1389,7 @@ var require_eslint_plugin_react_native = __commonJS({
1340
1389
  },
1341
1390
  environments: {
1342
1391
  "react-native": {
1343
- globals: __require("eslint-plugin-react-native-globals").environments.all.globals
1392
+ globals: require_eslint_plugin_react_native_globals().environments.all.globals
1344
1393
  }
1345
1394
  },
1346
1395
  configs: {
@@ -5659,7 +5708,7 @@ init_cjs_shims();
5659
5708
 
5660
5709
  // ../eslint-plugin-banner/package.json
5661
5710
  var package_default = {
5662
- version: "0.0.22"};
5711
+ version: "0.0.23"};
5663
5712
 
5664
5713
  // ../eslint-plugin-banner/src/rules/banner.ts
5665
5714
  init_cjs_shims();
@@ -17486,6 +17535,138 @@ plugin2.flatConfigs = flatConfigs;
17486
17535
  plugin2.configs = configs2;
17487
17536
  var lib_default = plugin2;
17488
17537
 
17538
+ // ../../node_modules/.pnpm/eslint-plugin-import-zod@1.2.1_@typescript-eslint+utils@8.61.0_eslint@10.5.0_jiti@2.7.0_93f73e2cf9fd550a22d85f8bbd8eb2eb/node_modules/eslint-plugin-import-zod/dist/index.mjs
17539
+ init_cjs_shims();
17540
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
17541
+ var __esm2 = (fn, res) => function() {
17542
+ return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
17543
+ };
17544
+ var __commonJS2 = (cb, mod) => function() {
17545
+ return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17546
+ };
17547
+ var createRule3;
17548
+ var getImportSource;
17549
+ var isAllSameSubmodule;
17550
+ var prefer_zod_namespace_default;
17551
+ var init_prefer_zod_namespace = __esm2({ "src/rules/prefer-zod-namespace.ts"() {
17552
+ createRule3 = utils.ESLintUtils.RuleCreator((name3) => `https://github.com/samchungy/eslint-plugin-import-zod/blob/main/docs/rules/${name3}.md`);
17553
+ getImportSource = (importedName, originalSource) => {
17554
+ return importedName === "core" && originalSource === "zod/v4" ? `${originalSource}/${importedName}` : originalSource;
17555
+ };
17556
+ isAllSameSubmodule = (specifiers, targetName) => {
17557
+ return specifiers.every((s) => s.imported.type === utils.TSESTree.AST_NODE_TYPES.Identifier && s.imported.name === targetName);
17558
+ };
17559
+ prefer_zod_namespace_default = createRule3({
17560
+ name: "prefer-zod-namespace",
17561
+ meta: {
17562
+ type: "suggestion",
17563
+ docs: { description: "Enforce using namespace imports for zod" },
17564
+ fixable: "code",
17565
+ schema: [],
17566
+ messages: { preferNamespaceImport: 'Import zod as a namespace (import * as z from "zod") instead of destructuring its exports or using default imports' }
17567
+ },
17568
+ defaultOptions: [],
17569
+ create(context) {
17570
+ return { ImportDeclaration(node2) {
17571
+ if (node2.source.value !== "zod" && !node2.source.value.startsWith("zod/")) return;
17572
+ const namedSpecifiers = node2.specifiers.filter((specifier) => specifier.type === utils.TSESTree.AST_NODE_TYPES.ImportSpecifier);
17573
+ const defaultSpecifiers = node2.specifiers.filter((specifier) => specifier.type === utils.TSESTree.AST_NODE_TYPES.ImportDefaultSpecifier);
17574
+ if (namedSpecifiers.length === 0 && defaultSpecifiers.length === 0) return;
17575
+ const zodSpecifiers = namedSpecifiers.filter((specifier) => specifier.imported.type === utils.TSESTree.AST_NODE_TYPES.Identifier && (specifier.imported.name === "z" || specifier.imported.name === "core"));
17576
+ const zodDefaultSpecifiers = defaultSpecifiers;
17577
+ if (zodSpecifiers.length === 0 && zodDefaultSpecifiers.length === 0) return;
17578
+ for (const zodDefaultSpecifier of zodDefaultSpecifiers) {
17579
+ const localName = zodDefaultSpecifier.local.name;
17580
+ const importSource = node2.source.value;
17581
+ context.report({
17582
+ node: zodDefaultSpecifier,
17583
+ messageId: "preferNamespaceImport",
17584
+ fix(fixer) {
17585
+ if (node2.specifiers.length === 1) {
17586
+ const isTypeOnlyImport = node2.importKind === "type";
17587
+ const typePrefix = isTypeOnlyImport ? "type " : "";
17588
+ return fixer.replaceText(node2, `import ${typePrefix}* as ${localName} from '${importSource}';`);
17589
+ } else {
17590
+ const otherSpecifiers = node2.specifiers.filter((s) => s !== zodDefaultSpecifier);
17591
+ const isTypeOnlyImport = node2.importKind === "type";
17592
+ const typePrefix = isTypeOnlyImport ? "type " : "";
17593
+ const namespaceImport = `import ${typePrefix}* as ${localName} from '${importSource}';
17594
+ `;
17595
+ const otherImportParts = [];
17596
+ const otherDefaultSpecifiers = otherSpecifiers.filter((s) => s.type === utils.TSESTree.AST_NODE_TYPES.ImportDefaultSpecifier);
17597
+ const otherNamedSpecifiers = otherSpecifiers.filter((s) => s.type === utils.TSESTree.AST_NODE_TYPES.ImportSpecifier);
17598
+ if (otherDefaultSpecifiers.length > 0) {
17599
+ const defaultName = otherDefaultSpecifiers[0].local.name;
17600
+ otherImportParts.push(defaultName);
17601
+ }
17602
+ if (otherNamedSpecifiers.length > 0) {
17603
+ const namedPart = `{ ${otherNamedSpecifiers.map((s) => {
17604
+ const specifierLocalName = s.local.name;
17605
+ const specifierImportedName = s.imported.type === utils.TSESTree.AST_NODE_TYPES.Identifier ? s.imported.name : "";
17606
+ const typeModifier = !isTypeOnlyImport && s.importKind === "type" ? "type " : "";
17607
+ return specifierLocalName === specifierImportedName ? `${typeModifier}${specifierImportedName}` : `${typeModifier}${specifierImportedName} as ${specifierLocalName}`;
17608
+ }).join(", ")} }`;
17609
+ otherImportParts.push(namedPart);
17610
+ }
17611
+ const otherImport = `import ${isTypeOnlyImport ? "type " : ""}${otherImportParts.join(", ")} from '${importSource}';`;
17612
+ return fixer.replaceText(node2, `${namespaceImport}${otherImport}`);
17613
+ }
17614
+ }
17615
+ });
17616
+ }
17617
+ for (const zodSpecifier of zodSpecifiers) {
17618
+ const localName = zodSpecifier.local.name;
17619
+ const importedName = zodSpecifier.imported.name;
17620
+ const importSource = getImportSource(importedName, node2.source.value);
17621
+ const isSubmoduleImport = importSource !== node2.source.value;
17622
+ context.report({
17623
+ node: zodSpecifier,
17624
+ messageId: "preferNamespaceImport",
17625
+ fix(fixer) {
17626
+ if (namedSpecifiers.length === 1 || isSubmoduleImport && isAllSameSubmodule(namedSpecifiers, importedName)) {
17627
+ const isTypeOnlyImport = node2.importKind === "type";
17628
+ const typePrefix = isTypeOnlyImport ? "type " : "";
17629
+ return fixer.replaceText(node2, `import ${typePrefix}* as ${localName} from '${importSource}';`);
17630
+ } else {
17631
+ const otherSpecifiers = namedSpecifiers.filter((s) => s !== zodSpecifier);
17632
+ const isTypeOnlyImport = node2.importKind === "type";
17633
+ const typePrefix = isTypeOnlyImport ? "type " : "";
17634
+ const namespaceImport = `import ${typePrefix}* as ${localName} from '${importSource}';
17635
+ `;
17636
+ const originalSource = node2.source.value;
17637
+ const otherImport = `import ${isTypeOnlyImport ? "type " : ""}{ ${otherSpecifiers.map((s) => {
17638
+ const specifierLocalName = s.local.name;
17639
+ const specifierImportedName = s.imported.type === utils.TSESTree.AST_NODE_TYPES.Identifier ? s.imported.name : "";
17640
+ const typeModifier = !isTypeOnlyImport && s.importKind === "type" ? "type " : "";
17641
+ return specifierLocalName === specifierImportedName ? `${typeModifier}${specifierImportedName}` : `${typeModifier}${specifierImportedName} as ${specifierLocalName}`;
17642
+ }).join(", ")} } from '${originalSource}';`;
17643
+ return fixer.replaceText(node2, `${namespaceImport}${otherImport}`);
17644
+ }
17645
+ }
17646
+ });
17647
+ }
17648
+ } };
17649
+ }
17650
+ });
17651
+ } });
17652
+ var require_src = __commonJS2({ "src/index.ts"(exports, module) {
17653
+ init_prefer_zod_namespace();
17654
+ const importZod = {
17655
+ meta: {
17656
+ name: "import-zod",
17657
+ version: "1.0.0"
17658
+ },
17659
+ rules: { "prefer-zod-namespace": prefer_zod_namespace_default },
17660
+ configs: {}
17661
+ };
17662
+ Object.assign(importZod.configs, { recommended: [{
17663
+ plugins: { "import-zod": importZod },
17664
+ rules: { "import-zod/prefer-zod-namespace": "error" }
17665
+ }] });
17666
+ module.exports = importZod;
17667
+ } });
17668
+ var dist_default = require_src();
17669
+
17489
17670
  // src/configs/imports.ts
17490
17671
  async function imports(options = {}) {
17491
17672
  const { stylistic: stylistic2 = true } = options;
@@ -17542,7 +17723,7 @@ async function javascript(options = {}) {
17542
17723
  {
17543
17724
  name: "storm/javascript/rules",
17544
17725
  plugins: {
17545
- "unused-imports": default12__default.default
17726
+ "unused-imports": default11__default.default
17546
17727
  },
17547
17728
  rules: {
17548
17729
  // disallow use of console
@@ -18850,7 +19031,7 @@ async function node() {
18850
19031
  {
18851
19032
  name: "storm/node/rules",
18852
19033
  plugins: {
18853
- node: default6__default.default
19034
+ node: default5__default.default
18854
19035
  },
18855
19036
  rules: {
18856
19037
  "node/handle-callback-err": ["error", "^(err|error)$"],
@@ -18940,7 +19121,7 @@ async function perfectionist() {
18940
19121
  {
18941
19122
  name: "storm/perfectionist/rules",
18942
19123
  plugins: {
18943
- perfectionist: default9__default.default
19124
+ perfectionist: default8__default.default
18944
19125
  },
18945
19126
  rules: {
18946
19127
  "perfectionist/sort-exports": [
@@ -19007,7 +19188,7 @@ function RuleCreator3(urlCreator) {
19007
19188
  meta: meta3,
19008
19189
  ...rule
19009
19190
  }) {
19010
- return createRule3({
19191
+ return createRule4({
19011
19192
  meta: {
19012
19193
  ...meta3,
19013
19194
  docs: {
@@ -19019,7 +19200,7 @@ function RuleCreator3(urlCreator) {
19019
19200
  });
19020
19201
  };
19021
19202
  }
19022
- function createRule3({
19203
+ function createRule4({
19023
19204
  create,
19024
19205
  defaultOptions,
19025
19206
  meta: meta3
@@ -19679,7 +19860,7 @@ plugin3.configs = configs3;
19679
19860
 
19680
19861
  // ../eslint-plugin-pnpm/package.json
19681
19862
  var package_default2 = {
19682
- version: "0.0.21"};
19863
+ version: "0.0.22"};
19683
19864
 
19684
19865
  // ../eslint-plugin-pnpm/src/plugin.ts
19685
19866
  var plugin4 = {
@@ -19855,7 +20036,7 @@ async function prettier() {
19855
20036
  {
19856
20037
  name: "storm/prettier",
19857
20038
  plugins: {
19858
- prettier: default10__default.default
20039
+ prettier: default9__default.default
19859
20040
  },
19860
20041
  rules: {
19861
20042
  "prettier/prettier": "error",
@@ -20137,7 +20318,7 @@ async function secrets(options) {
20137
20318
  name: "storm/secrets/rules",
20138
20319
  files: [`**/*.{js,ts,jsx,tsx${json ? ",json,jsonc" : ""}`],
20139
20320
  plugins: {
20140
- "no-secrets": default8__default.default
20321
+ "no-secrets": default7__default.default
20141
20322
  },
20142
20323
  rules: {
20143
20324
  "no-secrets/no-secrets": [
@@ -20441,7 +20622,7 @@ async function test(options = {}) {
20441
20622
  rules: {
20442
20623
  ...default4__default.default.rules,
20443
20624
  // extend `test/no-only-tests` rule
20444
- ...default7__default.default.rules
20625
+ ...default6__default.default.rules
20445
20626
  }
20446
20627
  };
20447
20628
  return [
@@ -20876,10 +21057,10 @@ async function unicorn(options = {}) {
20876
21057
  {
20877
21058
  name: "storm/unicorn/rules",
20878
21059
  plugins: {
20879
- unicorn: default11__default.default
21060
+ unicorn: default10__default.default
20880
21061
  },
20881
21062
  rules: {
20882
- ...options.allRecommended ? default11__default.default.configs["recommended"].rules : {
21063
+ ...options.allRecommended ? default10__default.default.configs["recommended"].rules : {
20883
21064
  "unicorn/consistent-empty-array-spread": "error",
20884
21065
  "unicorn/error-message": "error",
20885
21066
  "unicorn/escape-case": "error",
@@ -21015,7 +21196,7 @@ async function zod(options = {}) {
21015
21196
  name: "storm/zod/rules",
21016
21197
  files: [GLOB_SRC],
21017
21198
  plugins: {
21018
- "import-zod": default5__default.default
21199
+ "import-zod": dist_default
21019
21200
  },
21020
21201
  rules: {
21021
21202
  "import-zod/prefer-zod-namespace": "error"
package/dist/preset.js CHANGED
@@ -4,7 +4,6 @@ import { findWorkspaceRoot } from './chunk-2U26IRBT.js';
4
4
  import { joinPaths } from './chunk-I72VXUA2.js';
5
5
  import { __commonJS, init_esm_shims, __toESM, __require, __filename as __filename$1 } from './chunk-HUL5SEAB.js';
6
6
  import * as __import_util from 'util';
7
- import * as __import_eslintPluginReactNativeGlobals from 'eslint-plugin-react-native-globals';
8
7
  import * as __import__microsoft_tsdocConfig from '@microsoft/tsdoc-config';
9
8
  import * as __import_path from 'path';
10
9
  import * as __import_fs from 'fs';
@@ -35,14 +34,14 @@ import { expand } from 'brace-expansion';
35
34
  import * as semver from 'semver';
36
35
  import isGlob from 'is-glob';
37
36
  import eslintUnsupportedApi from 'eslint/use-at-your-own-risk';
38
- import default5 from 'eslint-plugin-import-zod';
39
- import default6 from 'eslint-plugin-n';
40
- import default7 from 'eslint-plugin-no-only-tests';
41
- import default8 from 'eslint-plugin-no-secrets';
42
- import default9 from 'eslint-plugin-perfectionist';
43
- import default10 from 'eslint-plugin-prettier';
44
- import default11 from 'eslint-plugin-unicorn';
45
- import default12 from 'eslint-plugin-unused-imports';
37
+ import { ESLintUtils, TSESTree as TSESTree$1 } from '@typescript-eslint/utils';
38
+ import default5 from 'eslint-plugin-n';
39
+ import default6 from 'eslint-plugin-no-only-tests';
40
+ import default7 from 'eslint-plugin-no-secrets';
41
+ import default8 from 'eslint-plugin-perfectionist';
42
+ import default9 from 'eslint-plugin-prettier';
43
+ import default10 from 'eslint-plugin-unicorn';
44
+ import default11 from 'eslint-plugin-unused-imports';
46
45
  import globalsLib from 'globals';
47
46
  import { mergeProcessors, processorPassThrough } from 'eslint-merge-processors';
48
47
  import { readCachedProjectGraph, createProjectGraphAsync } from '@nx/devkit';
@@ -1222,6 +1221,58 @@ var require_no_single_element_style_arrays = __commonJS({
1222
1221
  };
1223
1222
  }
1224
1223
  });
1224
+
1225
+ // ../../node_modules/.pnpm/eslint-plugin-react-native-globals@0.1.2/node_modules/eslint-plugin-react-native-globals/index.js
1226
+ var require_eslint_plugin_react_native_globals = __commonJS({
1227
+ "../../node_modules/.pnpm/eslint-plugin-react-native-globals@0.1.2/node_modules/eslint-plugin-react-native-globals/index.js"(exports, module) {
1228
+ init_esm_shims();
1229
+ var globals = {
1230
+ __DEV__: false,
1231
+ __dirname: false,
1232
+ alert: false,
1233
+ Blob: false,
1234
+ cancelAnimationFrame: false,
1235
+ cancelIdleCallback: false,
1236
+ clearImmediate: true,
1237
+ clearInterval: false,
1238
+ clearTimeout: false,
1239
+ console: false,
1240
+ escape: false,
1241
+ Event: false,
1242
+ EventTarget: false,
1243
+ exports: false,
1244
+ fetch: false,
1245
+ File: false,
1246
+ FileReader: false,
1247
+ FormData: false,
1248
+ global: false,
1249
+ Map: true,
1250
+ module: false,
1251
+ navigator: false,
1252
+ process: false,
1253
+ Promise: true,
1254
+ requestAnimationFrame: true,
1255
+ requestIdleCallback: true,
1256
+ require: false,
1257
+ Set: true,
1258
+ setImmediate: true,
1259
+ setInterval: false,
1260
+ setTimeout: false,
1261
+ WebSocket: false,
1262
+ window: false,
1263
+ XMLHttpRequest: false
1264
+ };
1265
+ module.exports = {
1266
+ environments: {
1267
+ all: {
1268
+ globals
1269
+ }
1270
+ }
1271
+ };
1272
+ }
1273
+ });
1274
+
1275
+ // ../../node_modules/.pnpm/eslint-plugin-react-native@5.0.0_patch_hash=1320a4c113a7f7ebb367bb0eaf377bd76dd7730f216_b81403553f777f68c7f42f6dd1713653/node_modules/eslint-plugin-react-native/index.js
1225
1276
  var require_eslint_plugin_react_native = __commonJS({
1226
1277
  "../../node_modules/.pnpm/eslint-plugin-react-native@5.0.0_patch_hash=1320a4c113a7f7ebb367bb0eaf377bd76dd7730f216_b81403553f777f68c7f42f6dd1713653/node_modules/eslint-plugin-react-native/index.js"(exports, module) {
1227
1278
  init_esm_shims();
@@ -1232,6 +1283,7 @@ var require_eslint_plugin_react_native = __commonJS({
1232
1283
  var __import___lib_rules_splitPlatformComponents = __toESM(require_split_platform_components());
1233
1284
  var __import___lib_rules_noRawText = __toESM(require_no_raw_text());
1234
1285
  var __import___lib_rules_noSingleElementStyleArrays = __toESM(require_no_single_element_style_arrays());
1286
+ var __import_eslintPluginReactNativeGlobals = __toESM(require_eslint_plugin_react_native_globals());
1235
1287
  var allRules = {
1236
1288
  "no-unused-styles": __import___lib_rules_noUnusedStyles,
1237
1289
  "no-inline-styles": __import___lib_rules_noInlineStyles,
@@ -5515,7 +5567,7 @@ init_esm_shims();
5515
5567
 
5516
5568
  // ../eslint-plugin-banner/package.json
5517
5569
  var package_default = {
5518
- version: "0.0.22"};
5570
+ version: "0.0.23"};
5519
5571
 
5520
5572
  // ../eslint-plugin-banner/src/rules/banner.ts
5521
5573
  init_esm_shims();
@@ -17084,6 +17136,138 @@ plugin2.flatConfigs = flatConfigs;
17084
17136
  plugin2.configs = configs2;
17085
17137
  var lib_default = plugin2;
17086
17138
 
17139
+ // ../../node_modules/.pnpm/eslint-plugin-import-zod@1.2.1_@typescript-eslint+utils@8.61.0_eslint@10.5.0_jiti@2.7.0_93f73e2cf9fd550a22d85f8bbd8eb2eb/node_modules/eslint-plugin-import-zod/dist/index.mjs
17140
+ init_esm_shims();
17141
+ var __getOwnPropNames = Object.getOwnPropertyNames;
17142
+ var __esm = (fn, res) => function() {
17143
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
17144
+ };
17145
+ var __commonJS2 = (cb, mod) => function() {
17146
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17147
+ };
17148
+ var createRule3;
17149
+ var getImportSource;
17150
+ var isAllSameSubmodule;
17151
+ var prefer_zod_namespace_default;
17152
+ var init_prefer_zod_namespace = __esm({ "src/rules/prefer-zod-namespace.ts"() {
17153
+ createRule3 = ESLintUtils.RuleCreator((name3) => `https://github.com/samchungy/eslint-plugin-import-zod/blob/main/docs/rules/${name3}.md`);
17154
+ getImportSource = (importedName, originalSource) => {
17155
+ return importedName === "core" && originalSource === "zod/v4" ? `${originalSource}/${importedName}` : originalSource;
17156
+ };
17157
+ isAllSameSubmodule = (specifiers, targetName) => {
17158
+ return specifiers.every((s) => s.imported.type === TSESTree$1.AST_NODE_TYPES.Identifier && s.imported.name === targetName);
17159
+ };
17160
+ prefer_zod_namespace_default = createRule3({
17161
+ name: "prefer-zod-namespace",
17162
+ meta: {
17163
+ type: "suggestion",
17164
+ docs: { description: "Enforce using namespace imports for zod" },
17165
+ fixable: "code",
17166
+ schema: [],
17167
+ messages: { preferNamespaceImport: 'Import zod as a namespace (import * as z from "zod") instead of destructuring its exports or using default imports' }
17168
+ },
17169
+ defaultOptions: [],
17170
+ create(context) {
17171
+ return { ImportDeclaration(node2) {
17172
+ if (node2.source.value !== "zod" && !node2.source.value.startsWith("zod/")) return;
17173
+ const namedSpecifiers = node2.specifiers.filter((specifier) => specifier.type === TSESTree$1.AST_NODE_TYPES.ImportSpecifier);
17174
+ const defaultSpecifiers = node2.specifiers.filter((specifier) => specifier.type === TSESTree$1.AST_NODE_TYPES.ImportDefaultSpecifier);
17175
+ if (namedSpecifiers.length === 0 && defaultSpecifiers.length === 0) return;
17176
+ const zodSpecifiers = namedSpecifiers.filter((specifier) => specifier.imported.type === TSESTree$1.AST_NODE_TYPES.Identifier && (specifier.imported.name === "z" || specifier.imported.name === "core"));
17177
+ const zodDefaultSpecifiers = defaultSpecifiers;
17178
+ if (zodSpecifiers.length === 0 && zodDefaultSpecifiers.length === 0) return;
17179
+ for (const zodDefaultSpecifier of zodDefaultSpecifiers) {
17180
+ const localName = zodDefaultSpecifier.local.name;
17181
+ const importSource = node2.source.value;
17182
+ context.report({
17183
+ node: zodDefaultSpecifier,
17184
+ messageId: "preferNamespaceImport",
17185
+ fix(fixer) {
17186
+ if (node2.specifiers.length === 1) {
17187
+ const isTypeOnlyImport = node2.importKind === "type";
17188
+ const typePrefix = isTypeOnlyImport ? "type " : "";
17189
+ return fixer.replaceText(node2, `import ${typePrefix}* as ${localName} from '${importSource}';`);
17190
+ } else {
17191
+ const otherSpecifiers = node2.specifiers.filter((s) => s !== zodDefaultSpecifier);
17192
+ const isTypeOnlyImport = node2.importKind === "type";
17193
+ const typePrefix = isTypeOnlyImport ? "type " : "";
17194
+ const namespaceImport = `import ${typePrefix}* as ${localName} from '${importSource}';
17195
+ `;
17196
+ const otherImportParts = [];
17197
+ const otherDefaultSpecifiers = otherSpecifiers.filter((s) => s.type === TSESTree$1.AST_NODE_TYPES.ImportDefaultSpecifier);
17198
+ const otherNamedSpecifiers = otherSpecifiers.filter((s) => s.type === TSESTree$1.AST_NODE_TYPES.ImportSpecifier);
17199
+ if (otherDefaultSpecifiers.length > 0) {
17200
+ const defaultName = otherDefaultSpecifiers[0].local.name;
17201
+ otherImportParts.push(defaultName);
17202
+ }
17203
+ if (otherNamedSpecifiers.length > 0) {
17204
+ const namedPart = `{ ${otherNamedSpecifiers.map((s) => {
17205
+ const specifierLocalName = s.local.name;
17206
+ const specifierImportedName = s.imported.type === TSESTree$1.AST_NODE_TYPES.Identifier ? s.imported.name : "";
17207
+ const typeModifier = !isTypeOnlyImport && s.importKind === "type" ? "type " : "";
17208
+ return specifierLocalName === specifierImportedName ? `${typeModifier}${specifierImportedName}` : `${typeModifier}${specifierImportedName} as ${specifierLocalName}`;
17209
+ }).join(", ")} }`;
17210
+ otherImportParts.push(namedPart);
17211
+ }
17212
+ const otherImport = `import ${isTypeOnlyImport ? "type " : ""}${otherImportParts.join(", ")} from '${importSource}';`;
17213
+ return fixer.replaceText(node2, `${namespaceImport}${otherImport}`);
17214
+ }
17215
+ }
17216
+ });
17217
+ }
17218
+ for (const zodSpecifier of zodSpecifiers) {
17219
+ const localName = zodSpecifier.local.name;
17220
+ const importedName = zodSpecifier.imported.name;
17221
+ const importSource = getImportSource(importedName, node2.source.value);
17222
+ const isSubmoduleImport = importSource !== node2.source.value;
17223
+ context.report({
17224
+ node: zodSpecifier,
17225
+ messageId: "preferNamespaceImport",
17226
+ fix(fixer) {
17227
+ if (namedSpecifiers.length === 1 || isSubmoduleImport && isAllSameSubmodule(namedSpecifiers, importedName)) {
17228
+ const isTypeOnlyImport = node2.importKind === "type";
17229
+ const typePrefix = isTypeOnlyImport ? "type " : "";
17230
+ return fixer.replaceText(node2, `import ${typePrefix}* as ${localName} from '${importSource}';`);
17231
+ } else {
17232
+ const otherSpecifiers = namedSpecifiers.filter((s) => s !== zodSpecifier);
17233
+ const isTypeOnlyImport = node2.importKind === "type";
17234
+ const typePrefix = isTypeOnlyImport ? "type " : "";
17235
+ const namespaceImport = `import ${typePrefix}* as ${localName} from '${importSource}';
17236
+ `;
17237
+ const originalSource = node2.source.value;
17238
+ const otherImport = `import ${isTypeOnlyImport ? "type " : ""}{ ${otherSpecifiers.map((s) => {
17239
+ const specifierLocalName = s.local.name;
17240
+ const specifierImportedName = s.imported.type === TSESTree$1.AST_NODE_TYPES.Identifier ? s.imported.name : "";
17241
+ const typeModifier = !isTypeOnlyImport && s.importKind === "type" ? "type " : "";
17242
+ return specifierLocalName === specifierImportedName ? `${typeModifier}${specifierImportedName}` : `${typeModifier}${specifierImportedName} as ${specifierLocalName}`;
17243
+ }).join(", ")} } from '${originalSource}';`;
17244
+ return fixer.replaceText(node2, `${namespaceImport}${otherImport}`);
17245
+ }
17246
+ }
17247
+ });
17248
+ }
17249
+ } };
17250
+ }
17251
+ });
17252
+ } });
17253
+ var require_src = __commonJS2({ "src/index.ts"(exports, module) {
17254
+ init_prefer_zod_namespace();
17255
+ const importZod = {
17256
+ meta: {
17257
+ name: "import-zod",
17258
+ version: "1.0.0"
17259
+ },
17260
+ rules: { "prefer-zod-namespace": prefer_zod_namespace_default },
17261
+ configs: {}
17262
+ };
17263
+ Object.assign(importZod.configs, { recommended: [{
17264
+ plugins: { "import-zod": importZod },
17265
+ rules: { "import-zod/prefer-zod-namespace": "error" }
17266
+ }] });
17267
+ module.exports = importZod;
17268
+ } });
17269
+ var dist_default = require_src();
17270
+
17087
17271
  // src/configs/imports.ts
17088
17272
  async function imports(options = {}) {
17089
17273
  const { stylistic: stylistic2 = true } = options;
@@ -17140,7 +17324,7 @@ async function javascript(options = {}) {
17140
17324
  {
17141
17325
  name: "storm/javascript/rules",
17142
17326
  plugins: {
17143
- "unused-imports": default12
17327
+ "unused-imports": default11
17144
17328
  },
17145
17329
  rules: {
17146
17330
  // disallow use of console
@@ -18448,7 +18632,7 @@ async function node() {
18448
18632
  {
18449
18633
  name: "storm/node/rules",
18450
18634
  plugins: {
18451
- node: default6
18635
+ node: default5
18452
18636
  },
18453
18637
  rules: {
18454
18638
  "node/handle-callback-err": ["error", "^(err|error)$"],
@@ -18538,7 +18722,7 @@ async function perfectionist() {
18538
18722
  {
18539
18723
  name: "storm/perfectionist/rules",
18540
18724
  plugins: {
18541
- perfectionist: default9
18725
+ perfectionist: default8
18542
18726
  },
18543
18727
  rules: {
18544
18728
  "perfectionist/sort-exports": [
@@ -18605,7 +18789,7 @@ function RuleCreator3(urlCreator) {
18605
18789
  meta: meta3,
18606
18790
  ...rule
18607
18791
  }) {
18608
- return createRule3({
18792
+ return createRule4({
18609
18793
  meta: {
18610
18794
  ...meta3,
18611
18795
  docs: {
@@ -18617,7 +18801,7 @@ function RuleCreator3(urlCreator) {
18617
18801
  });
18618
18802
  };
18619
18803
  }
18620
- function createRule3({
18804
+ function createRule4({
18621
18805
  create,
18622
18806
  defaultOptions,
18623
18807
  meta: meta3
@@ -19277,7 +19461,7 @@ plugin3.configs = configs3;
19277
19461
 
19278
19462
  // ../eslint-plugin-pnpm/package.json
19279
19463
  var package_default2 = {
19280
- version: "0.0.21"};
19464
+ version: "0.0.22"};
19281
19465
 
19282
19466
  // ../eslint-plugin-pnpm/src/plugin.ts
19283
19467
  var plugin4 = {
@@ -19453,7 +19637,7 @@ async function prettier() {
19453
19637
  {
19454
19638
  name: "storm/prettier",
19455
19639
  plugins: {
19456
- prettier: default10
19640
+ prettier: default9
19457
19641
  },
19458
19642
  rules: {
19459
19643
  "prettier/prettier": "error",
@@ -19735,7 +19919,7 @@ async function secrets(options) {
19735
19919
  name: "storm/secrets/rules",
19736
19920
  files: [`**/*.{js,ts,jsx,tsx${json ? ",json,jsonc" : ""}`],
19737
19921
  plugins: {
19738
- "no-secrets": default8
19922
+ "no-secrets": default7
19739
19923
  },
19740
19924
  rules: {
19741
19925
  "no-secrets/no-secrets": [
@@ -20039,7 +20223,7 @@ async function test(options = {}) {
20039
20223
  rules: {
20040
20224
  ...default4.rules,
20041
20225
  // extend `test/no-only-tests` rule
20042
- ...default7.rules
20226
+ ...default6.rules
20043
20227
  }
20044
20228
  };
20045
20229
  return [
@@ -20435,10 +20619,10 @@ async function unicorn(options = {}) {
20435
20619
  {
20436
20620
  name: "storm/unicorn/rules",
20437
20621
  plugins: {
20438
- unicorn: default11
20622
+ unicorn: default10
20439
20623
  },
20440
20624
  rules: {
20441
- ...options.allRecommended ? default11.configs["recommended"].rules : {
20625
+ ...options.allRecommended ? default10.configs["recommended"].rules : {
20442
20626
  "unicorn/consistent-empty-array-spread": "error",
20443
20627
  "unicorn/error-message": "error",
20444
20628
  "unicorn/escape-case": "error",
@@ -20574,7 +20758,7 @@ async function zod(options = {}) {
20574
20758
  name: "storm/zod/rules",
20575
20759
  files: [GLOB_SRC],
20576
20760
  plugins: {
20577
- "import-zod": default5
20761
+ "import-zod": dist_default
20578
20762
  },
20579
20763
  rules: {
20580
20764
  "import-zod/prefer-zod-namespace": "error"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.170.85",
3
+ "version": "0.170.87",
4
4
  "private": false,
5
5
  "description": "A package containing the base ESLint configuration used by Storm Software across many projects.",
6
6
  "keywords": [
@@ -141,9 +141,9 @@
141
141
  "@eslint/eslintrc": "^3.3.5",
142
142
  "@eslint/markdown": "^6.6.0",
143
143
  "@nx/eslint-plugin": "22.7.5",
144
- "@storm-software/config": "1.137.91",
145
- "@storm-software/config-tools": "1.190.59",
146
- "@storm-software/package-constants": "0.1.72",
144
+ "@storm-software/config": "1.137.92",
145
+ "@storm-software/config-tools": "1.190.60",
146
+ "@storm-software/package-constants": "0.1.73",
147
147
  "@stylistic/eslint-plugin": "^4.4.1",
148
148
  "@typescript-eslint/eslint-plugin": "^8.61.0",
149
149
  "@typescript-eslint/parser": "^8.61.0",
@@ -196,9 +196,9 @@
196
196
  "@next/eslint-plugin-next": "^15.5.19",
197
197
  "@nx/eslint": "22.7.5",
198
198
  "@prettier/plugin-xml": "^3.4.2",
199
- "@storm-software/eslint-plugin-banner": "0.0.23",
200
- "@storm-software/eslint-plugin-pnpm": "0.0.22",
201
- "@storm-software/eslint-plugin-tsdoc": "0.0.22",
199
+ "@storm-software/eslint-plugin-banner": "0.0.24",
200
+ "@storm-software/eslint-plugin-pnpm": "0.0.23",
201
+ "@storm-software/eslint-plugin-tsdoc": "0.0.23",
202
202
  "@stylistic/eslint-plugin-migrate": "^4.4.1",
203
203
  "@types/eslint": "^9.6.1",
204
204
  "@types/eslint__js": "^8.42.3",
@@ -240,12 +240,9 @@
240
240
  "eslint": "^10.5.0",
241
241
  "eslint-plugin-astro": "^1.2.0",
242
242
  "eslint-plugin-format": ">=0.1.0",
243
- "eslint-plugin-import-zod": "^1.2.0",
244
243
  "eslint-plugin-mdx": "^3.8.1",
245
244
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
246
245
  "eslint-plugin-react-hooks": "^7.1.1",
247
- "eslint-plugin-react-native": "^5.0.0",
248
- "eslint-plugin-react-native-globals": "^0.1.2",
249
246
  "eslint-plugin-relay": "^1.8.3",
250
247
  "eslint-plugin-storybook": "^0.11.0",
251
248
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0",
@@ -264,12 +261,9 @@
264
261
  "eslint": { "optional": false },
265
262
  "eslint-plugin-astro": { "optional": true },
266
263
  "eslint-plugin-format": { "optional": true },
267
- "eslint-plugin-import-zod": { "optional": true },
268
264
  "eslint-plugin-mdx": { "optional": true },
269
265
  "eslint-plugin-react-compiler": { "optional": true },
270
266
  "eslint-plugin-react-hooks": { "optional": true },
271
- "eslint-plugin-react-native": { "optional": true },
272
- "eslint-plugin-react-native-globals": { "optional": true },
273
267
  "eslint-plugin-relay": { "optional": true },
274
268
  "eslint-plugin-storybook": { "optional": true },
275
269
  "graphql": { "optional": true },
@@ -277,5 +271,5 @@
277
271
  "zod": { "optional": true }
278
272
  },
279
273
  "publishConfig": { "access": "public" },
280
- "gitHead": "ba6813f12e8952c4a767bde0f1524b2177408e3f"
274
+ "gitHead": "5c9b163eb1ed4b84c22b2f5d85d27786d215cf95"
281
275
  }