@storm-software/oxlint 0.0.2 → 0.0.4

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/index.cjs CHANGED
@@ -10,6 +10,8 @@ var fs = require('fs');
10
10
  var path = require('path');
11
11
  var z = require('zod/v4/mini');
12
12
  var promises = require('fs/promises');
13
+ var config = require('eslint-plugin-prettier/recommended');
14
+ var localPkg = require('local-pkg');
13
15
 
14
16
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
17
 
@@ -34,6 +36,7 @@ function _interopNamespace(e) {
34
36
  var defu__default = /*#__PURE__*/_interopDefault(defu);
35
37
  var chalk__default = /*#__PURE__*/_interopDefault(chalk);
36
38
  var z__namespace = /*#__PURE__*/_interopNamespace(z);
39
+ var config__default = /*#__PURE__*/_interopDefault(config);
37
40
 
38
41
  // ../config-tools/src/config-file/get-config-file.ts
39
42
 
@@ -193,14 +196,14 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
193
196
  };
194
197
 
195
198
  // ../config-tools/src/logger/console.ts
196
- var getLogFn = (logLevel = LogLevel.INFO, config = {}, options = {}) => {
199
+ var getLogFn = (logLevel = LogLevel.INFO, config2 = {}, options = {}) => {
197
200
  const {
198
201
  chalk: _chalk = getChalk(),
199
202
  fullDateTime = false,
200
203
  hideDateTime = false
201
204
  } = options;
202
- const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
203
- const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
205
+ const colors = !config2.colors?.dark && !config2.colors?.["base"] && !config2.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config2.colors?.dark && typeof config2.colors.dark === "string" ? config2.colors : config2.colors?.["base"]?.dark && typeof config2.colors["base"].dark === "string" ? config2.colors["base"].dark : config2.colors?.["base"] ? config2.colors?.["base"] : DEFAULT_COLOR_CONFIG;
206
+ const configLogLevel = config2.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
204
207
  if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
205
208
  return (_) => {
206
209
  };
@@ -303,8 +306,8 @@ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.
303
306
  );
304
307
  };
305
308
  };
306
- var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
307
- var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
309
+ var writeWarning = (message, config2) => getLogFn(LogLevel.WARN, config2)(message);
310
+ var writeTrace = (message, config2) => getLogFn(LogLevel.TRACE, config2)(message);
308
311
  var MAX_DEPTH = 10;
309
312
  var formatLogMessage = (message, options = {}, depth2 = 0) => {
310
313
  if (depth2 > MAX_DEPTH) {
@@ -1204,34 +1207,34 @@ async function getPackageJsonConfig(root) {
1204
1207
  support
1205
1208
  };
1206
1209
  }
1207
- function applyDefaultConfig(config) {
1208
- if (!config.support && config.contact) {
1209
- config.support = config.contact;
1210
+ function applyDefaultConfig(config2) {
1211
+ if (!config2.support && config2.contact) {
1212
+ config2.support = config2.contact;
1210
1213
  }
1211
- if (!config.contact && config.support) {
1212
- config.contact = config.support;
1214
+ if (!config2.contact && config2.support) {
1215
+ config2.contact = config2.support;
1213
1216
  }
1214
- if (config.homepage) {
1215
- if (!config.docs) {
1216
- config.docs = `${config.homepage}/docs`;
1217
+ if (config2.homepage) {
1218
+ if (!config2.docs) {
1219
+ config2.docs = `${config2.homepage}/docs`;
1217
1220
  }
1218
- if (!config.license) {
1219
- config.license = `${config.homepage}/license`;
1221
+ if (!config2.license) {
1222
+ config2.license = `${config2.homepage}/license`;
1220
1223
  }
1221
- if (!config.support) {
1222
- config.support = `${config.homepage}/support`;
1224
+ if (!config2.support) {
1225
+ config2.support = `${config2.homepage}/support`;
1223
1226
  }
1224
- if (!config.contact) {
1225
- config.contact = `${config.homepage}/contact`;
1227
+ if (!config2.contact) {
1228
+ config2.contact = `${config2.homepage}/contact`;
1226
1229
  }
1227
- if (!config.error?.codesFile || !config?.error?.url) {
1228
- config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
1229
- if (config.homepage) {
1230
- config.error.url ??= `${config.homepage}/errors`;
1230
+ if (!config2.error?.codesFile || !config2?.error?.url) {
1231
+ config2.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
1232
+ if (config2.homepage) {
1233
+ config2.error.url ??= `${config2.homepage}/errors`;
1231
1234
  }
1232
1235
  }
1233
1236
  }
1234
- return config;
1237
+ return config2;
1235
1238
  }
1236
1239
 
1237
1240
  // ../config-tools/src/config-file/get-config-file.ts
@@ -1273,9 +1276,9 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
1273
1276
  var getConfigFile = async (filePath, additionalFileNames = []) => {
1274
1277
  const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
1275
1278
  const result = await getConfigFileByName("storm-workspace", workspacePath);
1276
- let config = result.config;
1279
+ let config2 = result.config;
1277
1280
  const configFile = result.configFile;
1278
- if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
1281
+ if (config2 && configFile && Object.keys(config2).length > 0 && !config2.skipConfigLogging) {
1279
1282
  writeTrace(
1280
1283
  `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
1281
1284
  {
@@ -1291,7 +1294,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
1291
1294
  );
1292
1295
  for (const result2 of results) {
1293
1296
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
1294
- if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
1297
+ if (!config2.skipConfigLogging && !result2.config.skipConfigLogging) {
1295
1298
  writeTrace(
1296
1299
  `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
1297
1300
  {
@@ -1299,19 +1302,19 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
1299
1302
  }
1300
1303
  );
1301
1304
  }
1302
- config = defu__default.default(result2.config ?? {}, config ?? {});
1305
+ config2 = defu__default.default(result2.config ?? {}, config2 ?? {});
1303
1306
  }
1304
1307
  }
1305
1308
  }
1306
- if (!config || Object.keys(config).length === 0) {
1309
+ if (!config2 || Object.keys(config2).length === 0) {
1307
1310
  return void 0;
1308
1311
  }
1309
- config.configFile = configFile;
1310
- return config;
1312
+ config2.configFile = configFile;
1313
+ return config2;
1311
1314
  };
1312
1315
  var getConfigEnv = () => {
1313
1316
  const prefix = "STORM_";
1314
- let config = {
1317
+ let config2 = {
1315
1318
  extends: process.env[`${prefix}EXTENDS`] || void 0,
1316
1319
  name: process.env[`${prefix}NAME`] || void 0,
1317
1320
  variant: process.env[`${prefix}VARIANT`] || void 0,
@@ -1400,38 +1403,38 @@ var getConfigEnv = () => {
1400
1403
  (colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
1401
1404
  )
1402
1405
  );
1403
- config.colors = themeNames.length > 0 ? themeNames.reduce(
1406
+ config2.colors = themeNames.length > 0 ? themeNames.reduce(
1404
1407
  (ret, themeName) => {
1405
1408
  ret[themeName] = getThemeColorsEnv(prefix, themeName);
1406
1409
  return ret;
1407
1410
  },
1408
1411
  {}
1409
1412
  ) : getThemeColorsEnv(prefix);
1410
- if (config.docs === STORM_DEFAULT_DOCS) {
1411
- if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
1412
- config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
1413
+ if (config2.docs === STORM_DEFAULT_DOCS) {
1414
+ if (config2.homepage === STORM_DEFAULT_HOMEPAGE) {
1415
+ config2.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config2.name}/docs`;
1413
1416
  } else {
1414
- config.docs = `${config.homepage}/docs`;
1417
+ config2.docs = `${config2.homepage}/docs`;
1415
1418
  }
1416
1419
  }
1417
- if (config.licensing === STORM_DEFAULT_LICENSING) {
1418
- if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
1419
- config.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
1420
+ if (config2.licensing === STORM_DEFAULT_LICENSING) {
1421
+ if (config2.homepage === STORM_DEFAULT_HOMEPAGE) {
1422
+ config2.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config2.name}/licensing`;
1420
1423
  } else {
1421
- config.licensing = `${config.homepage}/docs`;
1424
+ config2.licensing = `${config2.homepage}/docs`;
1422
1425
  }
1423
1426
  }
1424
1427
  const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
1425
1428
  if (serializedConfig) {
1426
1429
  const parsed = JSON.parse(serializedConfig);
1427
- config = {
1428
- ...config,
1430
+ config2 = {
1431
+ ...config2,
1429
1432
  ...parsed,
1430
- colors: { ...config.colors, ...parsed.colors },
1431
- extensions: { ...config.extensions, ...parsed.extensions }
1433
+ colors: { ...config2.colors, ...parsed.colors },
1434
+ extensions: { ...config2.extensions, ...parsed.extensions }
1432
1435
  };
1433
1436
  }
1434
- return config;
1437
+ return config2;
1435
1438
  };
1436
1439
  var getThemeColorsEnv = (prefix, theme) => {
1437
1440
  const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
@@ -1535,360 +1538,360 @@ var setExtensionEnv = (extensionName, extension) => {
1535
1538
  }
1536
1539
  }
1537
1540
  };
1538
- var setConfigEnv = (config) => {
1541
+ var setConfigEnv = (config2) => {
1539
1542
  const prefix = "STORM_";
1540
- if (config.extends) {
1541
- process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
1543
+ if (config2.extends) {
1544
+ process.env[`${prefix}EXTENDS`] = Array.isArray(config2.extends) ? JSON.stringify(config2.extends) : config2.extends;
1542
1545
  }
1543
- if (config.name) {
1544
- process.env[`${prefix}NAME`] = config.name;
1546
+ if (config2.name) {
1547
+ process.env[`${prefix}NAME`] = config2.name;
1545
1548
  }
1546
- if (config.variant) {
1547
- process.env[`${prefix}VARIANT`] = config.variant;
1549
+ if (config2.variant) {
1550
+ process.env[`${prefix}VARIANT`] = config2.variant;
1548
1551
  }
1549
- if (config.namespace) {
1550
- process.env[`${prefix}NAMESPACE`] = config.namespace;
1552
+ if (config2.namespace) {
1553
+ process.env[`${prefix}NAMESPACE`] = config2.namespace;
1551
1554
  }
1552
- if (config.owner) {
1553
- process.env[`${prefix}OWNER`] = config.owner;
1555
+ if (config2.owner) {
1556
+ process.env[`${prefix}OWNER`] = config2.owner;
1554
1557
  }
1555
- if (config.bot) {
1556
- process.env[`${prefix}BOT_NAME`] = config.bot.name;
1557
- process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
1558
+ if (config2.bot) {
1559
+ process.env[`${prefix}BOT_NAME`] = config2.bot.name;
1560
+ process.env[`${prefix}BOT_EMAIL`] = config2.bot.email;
1558
1561
  }
1559
- if (config.error) {
1560
- process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
1561
- process.env[`${prefix}ERROR_URL`] = config.error.url;
1562
+ if (config2.error) {
1563
+ process.env[`${prefix}ERROR_CODES_FILE`] = config2.error.codesFile;
1564
+ process.env[`${prefix}ERROR_URL`] = config2.error.url;
1562
1565
  }
1563
- if (config.release) {
1564
- if (config.release.banner) {
1565
- if (typeof config.release.banner === "string") {
1566
- process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
1567
- process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
1566
+ if (config2.release) {
1567
+ if (config2.release.banner) {
1568
+ if (typeof config2.release.banner === "string") {
1569
+ process.env[`${prefix}RELEASE_BANNER`] = config2.release.banner;
1570
+ process.env[`${prefix}RELEASE_BANNER_URL`] = config2.release.banner;
1568
1571
  } else {
1569
- process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
1570
- process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
1571
- process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
1572
+ process.env[`${prefix}RELEASE_BANNER`] = config2.release.banner.url;
1573
+ process.env[`${prefix}RELEASE_BANNER_URL`] = config2.release.banner.url;
1574
+ process.env[`${prefix}RELEASE_BANNER_ALT`] = config2.release.banner.alt;
1572
1575
  }
1573
1576
  }
1574
- process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
1575
- process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
1577
+ process.env[`${prefix}RELEASE_HEADER`] = config2.release.header;
1578
+ process.env[`${prefix}RELEASE_FOOTER`] = config2.release.footer;
1576
1579
  }
1577
- if (config.socials) {
1578
- if (config.socials.twitter) {
1579
- process.env[`${prefix}SOCIAL_TWITTER`] = config.socials.twitter;
1580
+ if (config2.socials) {
1581
+ if (config2.socials.twitter) {
1582
+ process.env[`${prefix}SOCIAL_TWITTER`] = config2.socials.twitter;
1580
1583
  }
1581
- if (config.socials.discord) {
1582
- process.env[`${prefix}SOCIAL_DISCORD`] = config.socials.discord;
1584
+ if (config2.socials.discord) {
1585
+ process.env[`${prefix}SOCIAL_DISCORD`] = config2.socials.discord;
1583
1586
  }
1584
- if (config.socials.telegram) {
1585
- process.env[`${prefix}SOCIAL_TELEGRAM`] = config.socials.telegram;
1587
+ if (config2.socials.telegram) {
1588
+ process.env[`${prefix}SOCIAL_TELEGRAM`] = config2.socials.telegram;
1586
1589
  }
1587
- if (config.socials.slack) {
1588
- process.env[`${prefix}SOCIAL_SLACK`] = config.socials.slack;
1590
+ if (config2.socials.slack) {
1591
+ process.env[`${prefix}SOCIAL_SLACK`] = config2.socials.slack;
1589
1592
  }
1590
- if (config.socials.medium) {
1591
- process.env[`${prefix}SOCIAL_MEDIUM`] = config.socials.medium;
1593
+ if (config2.socials.medium) {
1594
+ process.env[`${prefix}SOCIAL_MEDIUM`] = config2.socials.medium;
1592
1595
  }
1593
- if (config.socials.github) {
1594
- process.env[`${prefix}SOCIAL_GITHUB`] = config.socials.github;
1596
+ if (config2.socials.github) {
1597
+ process.env[`${prefix}SOCIAL_GITHUB`] = config2.socials.github;
1595
1598
  }
1596
1599
  }
1597
- if (config.organization) {
1598
- if (typeof config.organization === "string") {
1599
- process.env[`${prefix}ORG`] = config.organization;
1600
- process.env[`${prefix}ORG_NAME`] = config.organization;
1601
- process.env[`${prefix}ORGANIZATION`] = config.organization;
1602
- process.env[`${prefix}ORGANIZATION_NAME`] = config.organization;
1600
+ if (config2.organization) {
1601
+ if (typeof config2.organization === "string") {
1602
+ process.env[`${prefix}ORG`] = config2.organization;
1603
+ process.env[`${prefix}ORG_NAME`] = config2.organization;
1604
+ process.env[`${prefix}ORGANIZATION`] = config2.organization;
1605
+ process.env[`${prefix}ORGANIZATION_NAME`] = config2.organization;
1603
1606
  } else {
1604
- process.env[`${prefix}ORG`] = config.organization.name;
1605
- process.env[`${prefix}ORG_NAME`] = config.organization.name;
1606
- process.env[`${prefix}ORGANIZATION`] = config.organization.name;
1607
- process.env[`${prefix}ORGANIZATION_NAME`] = config.organization.name;
1608
- if (config.organization.url) {
1609
- process.env[`${prefix}ORG_URL`] = config.organization.url;
1610
- process.env[`${prefix}ORGANIZATION_URL`] = config.organization.url;
1607
+ process.env[`${prefix}ORG`] = config2.organization.name;
1608
+ process.env[`${prefix}ORG_NAME`] = config2.organization.name;
1609
+ process.env[`${prefix}ORGANIZATION`] = config2.organization.name;
1610
+ process.env[`${prefix}ORGANIZATION_NAME`] = config2.organization.name;
1611
+ if (config2.organization.url) {
1612
+ process.env[`${prefix}ORG_URL`] = config2.organization.url;
1613
+ process.env[`${prefix}ORGANIZATION_URL`] = config2.organization.url;
1611
1614
  }
1612
- if (config.organization.description) {
1613
- process.env[`${prefix}ORG_DESCRIPTION`] = config.organization.description;
1614
- process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config.organization.description;
1615
+ if (config2.organization.description) {
1616
+ process.env[`${prefix}ORG_DESCRIPTION`] = config2.organization.description;
1617
+ process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config2.organization.description;
1615
1618
  }
1616
- if (config.organization.logo) {
1617
- process.env[`${prefix}ORG_LOGO`] = config.organization.logo;
1618
- process.env[`${prefix}ORGANIZATION_LOGO`] = config.organization.logo;
1619
+ if (config2.organization.logo) {
1620
+ process.env[`${prefix}ORG_LOGO`] = config2.organization.logo;
1621
+ process.env[`${prefix}ORGANIZATION_LOGO`] = config2.organization.logo;
1619
1622
  }
1620
- if (config.organization.icon) {
1621
- process.env[`${prefix}ORG_ICON`] = config.organization.icon;
1622
- process.env[`${prefix}ORGANIZATION_ICON`] = config.organization.icon;
1623
+ if (config2.organization.icon) {
1624
+ process.env[`${prefix}ORG_ICON`] = config2.organization.icon;
1625
+ process.env[`${prefix}ORGANIZATION_ICON`] = config2.organization.icon;
1623
1626
  }
1624
1627
  }
1625
1628
  }
1626
- if (config.packageManager) {
1627
- process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
1629
+ if (config2.packageManager) {
1630
+ process.env[`${prefix}PACKAGE_MANAGER`] = config2.packageManager;
1628
1631
  }
1629
- if (config.license) {
1630
- process.env[`${prefix}LICENSE`] = config.license;
1632
+ if (config2.license) {
1633
+ process.env[`${prefix}LICENSE`] = config2.license;
1631
1634
  }
1632
- if (config.homepage) {
1633
- process.env[`${prefix}HOMEPAGE`] = config.homepage;
1635
+ if (config2.homepage) {
1636
+ process.env[`${prefix}HOMEPAGE`] = config2.homepage;
1634
1637
  }
1635
- if (config.docs) {
1636
- process.env[`${prefix}DOCS`] = config.docs;
1638
+ if (config2.docs) {
1639
+ process.env[`${prefix}DOCS`] = config2.docs;
1637
1640
  }
1638
- if (config.portal) {
1639
- process.env[`${prefix}PORTAL`] = config.portal;
1641
+ if (config2.portal) {
1642
+ process.env[`${prefix}PORTAL`] = config2.portal;
1640
1643
  }
1641
- if (config.licensing) {
1642
- process.env[`${prefix}LICENSING`] = config.licensing;
1644
+ if (config2.licensing) {
1645
+ process.env[`${prefix}LICENSING`] = config2.licensing;
1643
1646
  }
1644
- if (config.contact) {
1645
- process.env[`${prefix}CONTACT`] = config.contact;
1647
+ if (config2.contact) {
1648
+ process.env[`${prefix}CONTACT`] = config2.contact;
1646
1649
  }
1647
- if (config.support) {
1648
- process.env[`${prefix}SUPPORT`] = config.support;
1650
+ if (config2.support) {
1651
+ process.env[`${prefix}SUPPORT`] = config2.support;
1649
1652
  }
1650
- if (config.timezone) {
1651
- process.env[`${prefix}TIMEZONE`] = config.timezone;
1652
- process.env.TZ = config.timezone;
1653
- process.env.DEFAULT_TIMEZONE = config.timezone;
1654
- process.env.TIMEZONE = config.timezone;
1653
+ if (config2.timezone) {
1654
+ process.env[`${prefix}TIMEZONE`] = config2.timezone;
1655
+ process.env.TZ = config2.timezone;
1656
+ process.env.DEFAULT_TIMEZONE = config2.timezone;
1657
+ process.env.TIMEZONE = config2.timezone;
1655
1658
  }
1656
- if (config.locale) {
1657
- process.env[`${prefix}LOCALE`] = config.locale;
1658
- process.env.DEFAULT_LOCALE = config.locale;
1659
- process.env.LOCALE = config.locale;
1660
- process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
1659
+ if (config2.locale) {
1660
+ process.env[`${prefix}LOCALE`] = config2.locale;
1661
+ process.env.DEFAULT_LOCALE = config2.locale;
1662
+ process.env.LOCALE = config2.locale;
1663
+ process.env.LANG = config2.locale ? `${config2.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
1661
1664
  }
1662
- if (config.configFile) {
1665
+ if (config2.configFile) {
1663
1666
  process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = correctPaths(
1664
- config.configFile
1667
+ config2.configFile
1665
1668
  );
1666
1669
  }
1667
- if (config.workspaceRoot) {
1668
- process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(config.workspaceRoot);
1669
- process.env.NX_WORKSPACE_ROOT = correctPaths(config.workspaceRoot);
1670
- process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config.workspaceRoot);
1670
+ if (config2.workspaceRoot) {
1671
+ process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(config2.workspaceRoot);
1672
+ process.env.NX_WORKSPACE_ROOT = correctPaths(config2.workspaceRoot);
1673
+ process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config2.workspaceRoot);
1671
1674
  }
1672
- if (config.directories) {
1673
- if (!config.skipCache && config.directories.cache) {
1675
+ if (config2.directories) {
1676
+ if (!config2.skipCache && config2.directories.cache) {
1674
1677
  process.env[`${prefix}CACHE_DIR`] = correctPaths(
1675
- config.directories.cache
1678
+ config2.directories.cache
1676
1679
  );
1677
1680
  process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
1678
1681
  }
1679
- if (config.directories.data) {
1680
- process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
1682
+ if (config2.directories.data) {
1683
+ process.env[`${prefix}DATA_DIR`] = correctPaths(config2.directories.data);
1681
1684
  process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
1682
1685
  }
1683
- if (config.directories.config) {
1686
+ if (config2.directories.config) {
1684
1687
  process.env[`${prefix}CONFIG_DIR`] = correctPaths(
1685
- config.directories.config
1688
+ config2.directories.config
1686
1689
  );
1687
1690
  process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
1688
1691
  }
1689
- if (config.directories.temp) {
1690
- process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
1692
+ if (config2.directories.temp) {
1693
+ process.env[`${prefix}TEMP_DIR`] = correctPaths(config2.directories.temp);
1691
1694
  process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
1692
1695
  }
1693
- if (config.directories.log) {
1694
- process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
1696
+ if (config2.directories.log) {
1697
+ process.env[`${prefix}LOG_DIR`] = correctPaths(config2.directories.log);
1695
1698
  process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
1696
1699
  }
1697
- if (config.directories.build) {
1700
+ if (config2.directories.build) {
1698
1701
  process.env[`${prefix}BUILD_DIR`] = correctPaths(
1699
- config.directories.build
1702
+ config2.directories.build
1700
1703
  );
1701
1704
  process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
1702
1705
  }
1703
1706
  }
1704
- if (config.skipCache !== void 0) {
1705
- process.env[`${prefix}SKIP_CACHE`] = String(config.skipCache);
1706
- if (config.skipCache) {
1707
- process.env.NX_SKIP_NX_CACHE ??= String(config.skipCache);
1708
- process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
1707
+ if (config2.skipCache !== void 0) {
1708
+ process.env[`${prefix}SKIP_CACHE`] = String(config2.skipCache);
1709
+ if (config2.skipCache) {
1710
+ process.env.NX_SKIP_NX_CACHE ??= String(config2.skipCache);
1711
+ process.env.NX_CACHE_PROJECT_GRAPH ??= String(config2.skipCache);
1709
1712
  }
1710
1713
  }
1711
- if (config.mode) {
1712
- process.env[`${prefix}MODE`] = config.mode;
1713
- process.env.NODE_ENV = config.mode;
1714
- process.env.ENVIRONMENT = config.mode;
1714
+ if (config2.mode) {
1715
+ process.env[`${prefix}MODE`] = config2.mode;
1716
+ process.env.NODE_ENV = config2.mode;
1717
+ process.env.ENVIRONMENT = config2.mode;
1715
1718
  }
1716
- if (config.colors?.base?.light || config.colors?.base?.dark) {
1717
- for (const key of Object.keys(config.colors)) {
1718
- setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
1719
+ if (config2.colors?.base?.light || config2.colors?.base?.dark) {
1720
+ for (const key of Object.keys(config2.colors)) {
1721
+ setThemeColorsEnv(`${prefix}COLOR_${key}_`, config2.colors[key]);
1719
1722
  }
1720
1723
  } else {
1721
1724
  setThemeColorsEnv(
1722
1725
  `${prefix}COLOR_`,
1723
- config.colors
1726
+ config2.colors
1724
1727
  );
1725
1728
  }
1726
- if (config.repository) {
1727
- process.env[`${prefix}REPOSITORY`] = config.repository;
1729
+ if (config2.repository) {
1730
+ process.env[`${prefix}REPOSITORY`] = config2.repository;
1728
1731
  }
1729
- if (config.branch) {
1730
- process.env[`${prefix}BRANCH`] = config.branch;
1732
+ if (config2.branch) {
1733
+ process.env[`${prefix}BRANCH`] = config2.branch;
1731
1734
  }
1732
- if (config.preid) {
1733
- process.env[`${prefix}PRE_ID`] = String(config.preid);
1735
+ if (config2.preid) {
1736
+ process.env[`${prefix}PRE_ID`] = String(config2.preid);
1734
1737
  }
1735
- if (config.registry) {
1736
- if (config.registry.github) {
1737
- process.env[`${prefix}REGISTRY_GITHUB`] = String(config.registry.github);
1738
+ if (config2.registry) {
1739
+ if (config2.registry.github) {
1740
+ process.env[`${prefix}REGISTRY_GITHUB`] = String(config2.registry.github);
1738
1741
  }
1739
- if (config.registry.npm) {
1740
- process.env[`${prefix}REGISTRY_NPM`] = String(config.registry.npm);
1742
+ if (config2.registry.npm) {
1743
+ process.env[`${prefix}REGISTRY_NPM`] = String(config2.registry.npm);
1741
1744
  }
1742
- if (config.registry.cargo) {
1743
- process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
1745
+ if (config2.registry.cargo) {
1746
+ process.env[`${prefix}REGISTRY_CARGO`] = String(config2.registry.cargo);
1744
1747
  }
1745
- if (config.registry.cyclone) {
1748
+ if (config2.registry.cyclone) {
1746
1749
  process.env[`${prefix}REGISTRY_CYCLONE`] = String(
1747
- config.registry.cyclone
1750
+ config2.registry.cyclone
1748
1751
  );
1749
1752
  }
1750
- if (config.registry.container) {
1753
+ if (config2.registry.container) {
1751
1754
  process.env[`${prefix}REGISTRY_CONTAINER`] = String(
1752
- config.registry.container
1755
+ config2.registry.container
1753
1756
  );
1754
1757
  }
1755
1758
  }
1756
- if (config.logLevel) {
1757
- process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
1758
- process.env.LOG_LEVEL = String(config.logLevel);
1759
+ if (config2.logLevel) {
1760
+ process.env[`${prefix}LOG_LEVEL`] = String(config2.logLevel);
1761
+ process.env.LOG_LEVEL = String(config2.logLevel);
1759
1762
  process.env.NX_VERBOSE_LOGGING = String(
1760
- getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
1763
+ getLogLevel(config2.logLevel) >= LogLevel.DEBUG ? true : false
1761
1764
  );
1762
- process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
1765
+ process.env.RUST_BACKTRACE = getLogLevel(config2.logLevel) >= LogLevel.DEBUG ? "full" : "none";
1763
1766
  }
1764
- if (config.skipConfigLogging !== void 0) {
1767
+ if (config2.skipConfigLogging !== void 0) {
1765
1768
  process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
1766
- config.skipConfigLogging
1769
+ config2.skipConfigLogging
1767
1770
  );
1768
1771
  }
1769
- process.env[`${prefix}WORKSPACE_CONFIG`] = JSON.stringify(config);
1770
- for (const key of Object.keys(config.extensions ?? {})) {
1771
- if (config.extensions[key] && Object.keys(config.extensions[key])) {
1772
- setExtensionEnv(key, config.extensions[key]);
1772
+ process.env[`${prefix}WORKSPACE_CONFIG`] = JSON.stringify(config2);
1773
+ for (const key of Object.keys(config2.extensions ?? {})) {
1774
+ if (config2.extensions[key] && Object.keys(config2.extensions[key])) {
1775
+ setExtensionEnv(key, config2.extensions[key]);
1773
1776
  }
1774
1777
  }
1775
1778
  };
1776
- var setThemeColorsEnv = (prefix, config) => {
1777
- return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
1779
+ var setThemeColorsEnv = (prefix, config2) => {
1780
+ return config2?.light?.brand || config2?.dark?.brand ? setMultiThemeColorsEnv(prefix, config2) : setSingleThemeColorsEnv(prefix, config2);
1778
1781
  };
1779
- var setSingleThemeColorsEnv = (prefix, config) => {
1780
- if (config.dark) {
1781
- process.env[`${prefix}DARK`] = config.dark;
1782
+ var setSingleThemeColorsEnv = (prefix, config2) => {
1783
+ if (config2.dark) {
1784
+ process.env[`${prefix}DARK`] = config2.dark;
1782
1785
  }
1783
- if (config.light) {
1784
- process.env[`${prefix}LIGHT`] = config.light;
1786
+ if (config2.light) {
1787
+ process.env[`${prefix}LIGHT`] = config2.light;
1785
1788
  }
1786
- if (config.brand) {
1787
- process.env[`${prefix}BRAND`] = config.brand;
1789
+ if (config2.brand) {
1790
+ process.env[`${prefix}BRAND`] = config2.brand;
1788
1791
  }
1789
- if (config.alternate) {
1790
- process.env[`${prefix}ALTERNATE`] = config.alternate;
1792
+ if (config2.alternate) {
1793
+ process.env[`${prefix}ALTERNATE`] = config2.alternate;
1791
1794
  }
1792
- if (config.accent) {
1793
- process.env[`${prefix}ACCENT`] = config.accent;
1795
+ if (config2.accent) {
1796
+ process.env[`${prefix}ACCENT`] = config2.accent;
1794
1797
  }
1795
- if (config.link) {
1796
- process.env[`${prefix}LINK`] = config.link;
1798
+ if (config2.link) {
1799
+ process.env[`${prefix}LINK`] = config2.link;
1797
1800
  }
1798
- if (config.help) {
1799
- process.env[`${prefix}HELP`] = config.help;
1801
+ if (config2.help) {
1802
+ process.env[`${prefix}HELP`] = config2.help;
1800
1803
  }
1801
- if (config.success) {
1802
- process.env[`${prefix}SUCCESS`] = config.success;
1804
+ if (config2.success) {
1805
+ process.env[`${prefix}SUCCESS`] = config2.success;
1803
1806
  }
1804
- if (config.info) {
1805
- process.env[`${prefix}INFO`] = config.info;
1807
+ if (config2.info) {
1808
+ process.env[`${prefix}INFO`] = config2.info;
1806
1809
  }
1807
- if (config.debug) {
1808
- process.env[`${prefix}DEBUG`] = config.debug;
1810
+ if (config2.debug) {
1811
+ process.env[`${prefix}DEBUG`] = config2.debug;
1809
1812
  }
1810
- if (config.warning) {
1811
- process.env[`${prefix}WARNING`] = config.warning;
1813
+ if (config2.warning) {
1814
+ process.env[`${prefix}WARNING`] = config2.warning;
1812
1815
  }
1813
- if (config.danger) {
1814
- process.env[`${prefix}DANGER`] = config.danger;
1816
+ if (config2.danger) {
1817
+ process.env[`${prefix}DANGER`] = config2.danger;
1815
1818
  }
1816
- if (config.fatal) {
1817
- process.env[`${prefix}FATAL`] = config.fatal;
1819
+ if (config2.fatal) {
1820
+ process.env[`${prefix}FATAL`] = config2.fatal;
1818
1821
  }
1819
- if (config.performance) {
1820
- process.env[`${prefix}PERFORMANCE`] = config.performance;
1822
+ if (config2.performance) {
1823
+ process.env[`${prefix}PERFORMANCE`] = config2.performance;
1821
1824
  }
1822
- if (config.positive) {
1823
- process.env[`${prefix}POSITIVE`] = config.positive;
1825
+ if (config2.positive) {
1826
+ process.env[`${prefix}POSITIVE`] = config2.positive;
1824
1827
  }
1825
- if (config.negative) {
1826
- process.env[`${prefix}NEGATIVE`] = config.negative;
1828
+ if (config2.negative) {
1829
+ process.env[`${prefix}NEGATIVE`] = config2.negative;
1827
1830
  }
1828
- if (config.gradient) {
1829
- for (let i = 0; i < config.gradient.length; i++) {
1830
- process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
1831
+ if (config2.gradient) {
1832
+ for (let i = 0; i < config2.gradient.length; i++) {
1833
+ process.env[`${prefix}GRADIENT_${i}`] = config2.gradient[i];
1831
1834
  }
1832
1835
  }
1833
1836
  };
1834
- var setMultiThemeColorsEnv = (prefix, config) => {
1837
+ var setMultiThemeColorsEnv = (prefix, config2) => {
1835
1838
  return {
1836
- light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
1837
- dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
1839
+ light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config2.light),
1840
+ dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config2.dark)
1838
1841
  };
1839
1842
  };
1840
- var setBaseThemeColorsEnv = (prefix, config) => {
1841
- if (config.foreground) {
1842
- process.env[`${prefix}FOREGROUND`] = config.foreground;
1843
+ var setBaseThemeColorsEnv = (prefix, config2) => {
1844
+ if (config2.foreground) {
1845
+ process.env[`${prefix}FOREGROUND`] = config2.foreground;
1843
1846
  }
1844
- if (config.background) {
1845
- process.env[`${prefix}BACKGROUND`] = config.background;
1847
+ if (config2.background) {
1848
+ process.env[`${prefix}BACKGROUND`] = config2.background;
1846
1849
  }
1847
- if (config.brand) {
1848
- process.env[`${prefix}BRAND`] = config.brand;
1850
+ if (config2.brand) {
1851
+ process.env[`${prefix}BRAND`] = config2.brand;
1849
1852
  }
1850
- if (config.alternate) {
1851
- process.env[`${prefix}ALTERNATE`] = config.alternate;
1853
+ if (config2.alternate) {
1854
+ process.env[`${prefix}ALTERNATE`] = config2.alternate;
1852
1855
  }
1853
- if (config.accent) {
1854
- process.env[`${prefix}ACCENT`] = config.accent;
1856
+ if (config2.accent) {
1857
+ process.env[`${prefix}ACCENT`] = config2.accent;
1855
1858
  }
1856
- if (config.link) {
1857
- process.env[`${prefix}LINK`] = config.link;
1859
+ if (config2.link) {
1860
+ process.env[`${prefix}LINK`] = config2.link;
1858
1861
  }
1859
- if (config.help) {
1860
- process.env[`${prefix}HELP`] = config.help;
1862
+ if (config2.help) {
1863
+ process.env[`${prefix}HELP`] = config2.help;
1861
1864
  }
1862
- if (config.success) {
1863
- process.env[`${prefix}SUCCESS`] = config.success;
1865
+ if (config2.success) {
1866
+ process.env[`${prefix}SUCCESS`] = config2.success;
1864
1867
  }
1865
- if (config.info) {
1866
- process.env[`${prefix}INFO`] = config.info;
1868
+ if (config2.info) {
1869
+ process.env[`${prefix}INFO`] = config2.info;
1867
1870
  }
1868
- if (config.debug) {
1869
- process.env[`${prefix}DEBUG`] = config.debug;
1871
+ if (config2.debug) {
1872
+ process.env[`${prefix}DEBUG`] = config2.debug;
1870
1873
  }
1871
- if (config.warning) {
1872
- process.env[`${prefix}WARNING`] = config.warning;
1874
+ if (config2.warning) {
1875
+ process.env[`${prefix}WARNING`] = config2.warning;
1873
1876
  }
1874
- if (config.danger) {
1875
- process.env[`${prefix}DANGER`] = config.danger;
1877
+ if (config2.danger) {
1878
+ process.env[`${prefix}DANGER`] = config2.danger;
1876
1879
  }
1877
- if (config.fatal) {
1878
- process.env[`${prefix}FATAL`] = config.fatal;
1880
+ if (config2.fatal) {
1881
+ process.env[`${prefix}FATAL`] = config2.fatal;
1879
1882
  }
1880
- if (config.performance) {
1881
- process.env[`${prefix}PERFORMANCE`] = config.performance;
1883
+ if (config2.performance) {
1884
+ process.env[`${prefix}PERFORMANCE`] = config2.performance;
1882
1885
  }
1883
- if (config.positive) {
1884
- process.env[`${prefix}POSITIVE`] = config.positive;
1886
+ if (config2.positive) {
1887
+ process.env[`${prefix}POSITIVE`] = config2.positive;
1885
1888
  }
1886
- if (config.negative) {
1887
- process.env[`${prefix}NEGATIVE`] = config.negative;
1889
+ if (config2.negative) {
1890
+ process.env[`${prefix}NEGATIVE`] = config2.negative;
1888
1891
  }
1889
- if (config.gradient) {
1890
- for (let i = 0; i < config.gradient.length; i++) {
1891
- process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
1892
+ if (config2.gradient) {
1893
+ for (let i = 0; i < config2.gradient.length; i++) {
1894
+ process.env[`${prefix}GRADIENT_${i}`] = config2.gradient[i];
1892
1895
  }
1893
1896
  }
1894
1897
  };
@@ -1954,25 +1957,25 @@ Please ensure your configuration file is valid JSON and matches the expected sch
1954
1957
  };
1955
1958
  var tryLoadStormWorkspaceConfig = async (workspaceRoot, skipLogs = true, useDefault = false) => {
1956
1959
  try {
1957
- const config = await createStormWorkspaceConfig(
1960
+ const config2 = await createStormWorkspaceConfig(
1958
1961
  void 0,
1959
1962
  void 0,
1960
1963
  workspaceRoot,
1961
1964
  skipLogs,
1962
1965
  useDefault
1963
1966
  );
1964
- if (!config) {
1967
+ if (!config2) {
1965
1968
  return void 0;
1966
1969
  }
1967
- setConfigEnv(config);
1968
- if (!skipLogs && !config.skipConfigLogging) {
1970
+ setConfigEnv(config2);
1971
+ if (!skipLogs && !config2.skipConfigLogging) {
1969
1972
  writeTrace(
1970
1973
  `\u2699\uFE0F Using Storm Workspace configuration:
1971
- ${formatLogMessage(config)}`,
1972
- config
1974
+ ${formatLogMessage(config2)}`,
1975
+ config2
1973
1976
  );
1974
1977
  }
1975
- return config;
1978
+ return config2;
1976
1979
  } catch (error) {
1977
1980
  if (!skipLogs) {
1978
1981
  writeWarning(
@@ -2149,6 +2152,17 @@ function pnpm(options) {
2149
2152
  }
2150
2153
  };
2151
2154
  }
2155
+ function prettier() {
2156
+ return {
2157
+ jsPlugins: ["eslint-plugin-prettier"],
2158
+ rules: {
2159
+ ...config__default.default.rules,
2160
+ "prettier/prettier": "error",
2161
+ "arrow-body-style": "off",
2162
+ "prefer-arrow-callback": "off"
2163
+ }
2164
+ };
2165
+ }
2152
2166
 
2153
2167
  // src/configs/promise.ts
2154
2168
  function promise() {
@@ -2156,23 +2170,136 @@ function promise() {
2156
2170
  plugins: ["promise"]
2157
2171
  };
2158
2172
  }
2159
-
2160
- // src/configs/react.ts
2173
+ var ReactRefreshAllowConstantExportPackages = ["vite"];
2174
+ var ReactRouterPackages = [
2175
+ "@react-router/node",
2176
+ "@react-router/react",
2177
+ "@react-router/serve",
2178
+ "@react-router/dev"
2179
+ ];
2161
2180
  function react(options = {}) {
2162
- return {
2163
- plugins: ["react"],
2164
- rules: {
2165
- "react/jsx-key": "error",
2166
- "react/jsx-no-target-blank": "warn",
2167
- "react/no-danger": "warn",
2168
- "react/no-unknown-property": "error"
2181
+ const { typeAware = true } = options;
2182
+ const typeAwareRules = {
2183
+ "react/no-leaked-conditional-rendering": "warn"
2184
+ };
2185
+ const isAllowConstantExport = ReactRefreshAllowConstantExportPackages.some(
2186
+ (i) => localPkg.isPackageExists(i)
2187
+ );
2188
+ const isUsingReactRouter = ReactRouterPackages.some((i) => localPkg.isPackageExists(i));
2189
+ return [
2190
+ {
2191
+ plugins: ["react"],
2192
+ rules: {
2193
+ // recommended rules from @eslint-react/dom
2194
+ "react-dom/no-children-in-void-dom-elements": "warn",
2195
+ "react-dom/no-dangerously-set-innerhtml": "warn",
2196
+ "react-dom/no-dangerously-set-innerhtml-with-children": "error",
2197
+ "react-dom/no-find-dom-node": "error",
2198
+ "react-dom/no-missing-button-type": "warn",
2199
+ "react-dom/no-missing-iframe-sandbox": "warn",
2200
+ "react-dom/no-namespace": "error",
2201
+ "react-dom/no-render-return-value": "error",
2202
+ "react-dom/no-script-url": "warn",
2203
+ "react-dom/no-unsafe-iframe-sandbox": "warn",
2204
+ "react-dom/no-unsafe-target-blank": "warn",
2205
+ // recommended rules react-hooks
2206
+ "react-hooks/exhaustive-deps": "warn",
2207
+ "react-hooks/rules-of-hooks": "error",
2208
+ // react refresh
2209
+ "react-refresh/only-export-components": [
2210
+ "warn",
2211
+ {
2212
+ allowConstantExport: isAllowConstantExport,
2213
+ allowExportNames: [
2214
+ "dynamic",
2215
+ "dynamicParams",
2216
+ "revalidate",
2217
+ "fetchCache",
2218
+ "runtime",
2219
+ "preferredRegion",
2220
+ "maxDuration",
2221
+ "config",
2222
+ "generateStaticParams",
2223
+ "metadata",
2224
+ "generateMetadata",
2225
+ "viewport",
2226
+ "generateViewport"
2227
+ ].concat(
2228
+ isUsingReactRouter ? ["meta", "links", "headers", "loader", "action"] : []
2229
+ )
2230
+ }
2231
+ ],
2232
+ // recommended rules from @eslint-react/web-api
2233
+ "react-web-api/no-leaked-event-listener": "warn",
2234
+ "react-web-api/no-leaked-interval": "warn",
2235
+ "react-web-api/no-leaked-resize-observer": "warn",
2236
+ "react-web-api/no-leaked-timeout": "warn",
2237
+ // recommended rules from @eslint-react
2238
+ "react/ensure-forward-ref-using-ref": "warn",
2239
+ "react/jsx-no-duplicate-props": "warn",
2240
+ "react/jsx-uses-vars": "warn",
2241
+ "react/no-access-state-in-setstate": "error",
2242
+ "react/no-array-index-key": "warn",
2243
+ "react/no-children-count": "warn",
2244
+ "react/no-children-for-each": "warn",
2245
+ "react/no-children-map": "warn",
2246
+ "react/no-children-only": "warn",
2247
+ "react/no-children-to-array": "warn",
2248
+ "react/no-clone-element": "warn",
2249
+ "react/no-comment-textnodes": "warn",
2250
+ "react/no-component-will-mount": "error",
2251
+ "react/no-component-will-receive-props": "error",
2252
+ "react/no-component-will-update": "error",
2253
+ "react/no-context-provider": "warn",
2254
+ "react/no-create-ref": "error",
2255
+ "react/no-default-props": "error",
2256
+ "react/no-direct-mutation-state": "error",
2257
+ "react/no-duplicate-key": "error",
2258
+ "react/no-forward-ref": "warn",
2259
+ "react/no-implicit-key": "warn",
2260
+ "react/no-missing-key": "error",
2261
+ "react/no-nested-components": "error",
2262
+ "react/no-prop-types": "error",
2263
+ "react/no-redundant-should-component-update": "error",
2264
+ "react/no-set-state-in-component-did-mount": "warn",
2265
+ "react/no-set-state-in-component-did-update": "warn",
2266
+ "react/no-set-state-in-component-will-update": "warn",
2267
+ "react/no-string-refs": "error",
2268
+ "react/no-unsafe-component-will-mount": "warn",
2269
+ "react/no-unsafe-component-will-receive-props": "warn",
2270
+ "react/no-unsafe-component-will-update": "warn",
2271
+ "react/no-unstable-context-value": "warn",
2272
+ "react/no-unstable-default-props": "warn",
2273
+ "react/no-unused-class-component-members": "warn",
2274
+ "react/no-unused-state": "warn",
2275
+ "react/prefer-destructuring-assignment": "warn",
2276
+ "react/prefer-shorthand-boolean": "warn",
2277
+ "react/prefer-shorthand-fragment": "warn",
2278
+ "react/jsx-key": "error",
2279
+ "react/jsx-no-target-blank": "warn",
2280
+ "react/no-danger": "warn",
2281
+ "react/no-unknown-property": "error"
2282
+ },
2283
+ settings: {
2284
+ react: {
2285
+ version: options.version || "detect"
2286
+ }
2287
+ }
2169
2288
  },
2170
- settings: {
2171
- react: {
2172
- version: options.version || "detect"
2289
+ {
2290
+ jsPlugins: ["eslint-plugin-react-compiler"],
2291
+ rules: {
2292
+ "react-compiler/react-compiler": "error"
2173
2293
  }
2174
- }
2175
- };
2294
+ },
2295
+ ...typeAware ? [
2296
+ {
2297
+ rules: {
2298
+ ...typeAwareRules
2299
+ }
2300
+ }
2301
+ ] : []
2302
+ ];
2176
2303
  }
2177
2304
 
2178
2305
  // src/configs/react-perf.ts
@@ -2412,6 +2539,7 @@ async function getStormConfig(options = {}, ...userConfigs) {
2412
2539
  jsdoc: enableJsdoc = true,
2413
2540
  node: enableNode = true,
2414
2541
  promise: enablePromise = true,
2542
+ prettier: enablePrettier = true,
2415
2543
  pnpm: enablePnpm = true,
2416
2544
  tsdoc: enableTSDoc = true,
2417
2545
  unicorn: enableUnicorn = true,
@@ -2449,7 +2577,12 @@ async function getStormConfig(options = {}, ...userConfigs) {
2449
2577
  configs.push(typescript(resolveSubOptions(enableTypeScript)));
2450
2578
  }
2451
2579
  if (enableReact) {
2452
- configs.push(react(resolveSubOptions(enableReact)));
2580
+ configs.push(
2581
+ ...react({
2582
+ typeAware: enableTypeScript !== false,
2583
+ ...resolveSubOptions(enableReact)
2584
+ })
2585
+ );
2453
2586
  }
2454
2587
  if (enableReactPerf) {
2455
2588
  configs.push(reactPerf());
@@ -2469,6 +2602,9 @@ async function getStormConfig(options = {}, ...userConfigs) {
2469
2602
  if (enablePromise) {
2470
2603
  configs.push(promise());
2471
2604
  }
2605
+ if (enablePrettier) {
2606
+ configs.push(prettier());
2607
+ }
2472
2608
  if (enableUnicorn) {
2473
2609
  configs.push(unicorn());
2474
2610
  }
@@ -2511,8 +2647,8 @@ var getConfig = getStormConfig;
2511
2647
  var defineConfig = getStormConfig;
2512
2648
 
2513
2649
  // src/utils/format-config.ts
2514
- function formatConfig(name, config = []) {
2515
- return config.map((item, index) => {
2650
+ function formatConfig(name, config2 = []) {
2651
+ return config2.map((item, index) => {
2516
2652
  if (!item) {
2517
2653
  return {};
2518
2654
  }
@@ -2534,6 +2670,7 @@ exports.GLOB_SRC = GLOB_SRC;
2534
2670
  exports.GLOB_SRC_EXT = GLOB_SRC_EXT;
2535
2671
  exports.GLOB_SRC_FILE = GLOB_SRC_FILE;
2536
2672
  exports.GLOB_TEST = GLOB_TEST;
2673
+ exports.banner = banner;
2537
2674
  exports.combine = combine;
2538
2675
  exports.default = index_default;
2539
2676
  exports.defineConfig = defineConfig;
@@ -2546,11 +2683,14 @@ exports.jsdoc = jsdoc;
2546
2683
  exports.jsx = jsx;
2547
2684
  exports.next = next;
2548
2685
  exports.node = node;
2686
+ exports.pnpm = pnpm;
2687
+ exports.prettier = prettier;
2549
2688
  exports.promise = promise;
2550
2689
  exports.react = react;
2551
2690
  exports.reactPerf = reactPerf;
2552
2691
  exports.regexp = regexp;
2553
2692
  exports.storybook = storybook;
2554
2693
  exports.test = test;
2694
+ exports.tsdoc = tsdoc;
2555
2695
  exports.typescript = typescript;
2556
2696
  exports.unicorn = unicorn;