@storm-software/eslint 0.170.93 → 0.170.94

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/preset.cjs CHANGED
@@ -5707,7 +5707,7 @@ init_cjs_shims();
5707
5707
 
5708
5708
  // ../eslint-plugin-banner/package.json
5709
5709
  var package_default = {
5710
- version: "0.0.25"};
5710
+ version: "0.0.26"};
5711
5711
 
5712
5712
  // ../eslint-plugin-banner/src/rules/banner.ts
5713
5713
  init_cjs_shims();
@@ -6490,6 +6490,13 @@ var relative = function(from, to) {
6490
6490
  }
6491
6491
  return [..._from.map(() => ".."), ..._to].join("/");
6492
6492
  };
6493
+ var dirname = function(p) {
6494
+ const segments = normalizeWindowsPath2(p).replace(/\/$/, "").split("/").slice(0, -1);
6495
+ if (segments.length === 1 && _DRIVE_LETTER_RE2.test(segments[0])) {
6496
+ segments[0] += "/";
6497
+ }
6498
+ return segments.join("/") || (isAbsolute2(p) ? "/" : ".");
6499
+ };
6493
6500
 
6494
6501
  // src/utils/find-workspace-root.ts
6495
6502
  init_cjs_shims();
@@ -20095,6 +20102,7 @@ async function react(options = {}) {
20095
20102
  ignoresTypeAware = [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS],
20096
20103
  strict = false,
20097
20104
  overrides = {},
20105
+ componentExts = [],
20098
20106
  tsconfigPath
20099
20107
  } = options;
20100
20108
  await ensurePackages([
@@ -20136,8 +20144,11 @@ async function react(options = {}) {
20136
20144
  (i) => localPkg.isPackageExists(i)
20137
20145
  );
20138
20146
  const isUsingReactRouter = ReactRouterPackages.some((i) => localPkg.isPackageExists(i));
20147
+ const [pluginTs, parserTs] = await Promise.all([
20148
+ interopDefault(import('@typescript-eslint/eslint-plugin')),
20149
+ interopDefault(import('@typescript-eslint/parser'))
20150
+ ]);
20139
20151
  return [
20140
- pluginReactHooks.configs.flat["recommended-latest"],
20141
20152
  {
20142
20153
  name: "storm/react/setup",
20143
20154
  plugins: {
@@ -20152,6 +20163,7 @@ async function react(options = {}) {
20152
20163
  "react-web-api": pluginReactWebApi
20153
20164
  }
20154
20165
  },
20166
+ pluginReactHooks.configs.flat["recommended-latest"],
20155
20167
  {
20156
20168
  files,
20157
20169
  languageOptions: {
@@ -20165,7 +20177,7 @@ async function react(options = {}) {
20165
20177
  name: "storm/react/rules",
20166
20178
  rules: {
20167
20179
  ...renameRules2(
20168
- !!tsconfigPath ? strict ? pluginReact.configs["strict-type-checked"] : pluginReact.configs["recommended-type-checked"] : strict ? pluginReact.configs["strict"] : pluginReact.configs["recommended"]
20180
+ strict ? pluginReact.configs["strict"] : pluginReact.configs["recommended"]
20169
20181
  ),
20170
20182
  "react-hooks/exhaustive-deps": strict ? "error" : "warn",
20171
20183
  "react-hooks/rules-of-hooks": "error",
@@ -20238,9 +20250,6 @@ async function react(options = {}) {
20238
20250
  "react/no-unstable-default-props": "warn",
20239
20251
  "react/no-unused-class-component-members": "warn",
20240
20252
  "react/no-unused-state": "warn",
20241
- // "react/prefer-destructuring-assignment": "warn",
20242
- // "react/prefer-shorthand-boolean": "warn",
20243
- // "react/prefer-shorthand-fragment": "warn",
20244
20253
  ...overrides
20245
20254
  }
20246
20255
  },
@@ -20248,8 +20257,25 @@ async function react(options = {}) {
20248
20257
  {
20249
20258
  files: filesTypeAware,
20250
20259
  ignores: ignoresTypeAware,
20260
+ languageOptions: {
20261
+ parser: parserTs,
20262
+ parserOptions: {
20263
+ extraFileExtensions: componentExts.map((ext2) => `.${ext2}`),
20264
+ ecmaFeatures: { jsx: true },
20265
+ ecmaVersion: 2022,
20266
+ sourceType: "module",
20267
+ projectService: {
20268
+ allowDefaultProject: [GLOB_SRC_FILE],
20269
+ defaultProject: tsconfigPath
20270
+ },
20271
+ tsconfigRootDir: !tsconfigPath ? findWorkspaceRoot2() : dirname(tsconfigPath)
20272
+ }
20273
+ },
20251
20274
  name: "storm/react/type-aware-rules",
20252
20275
  rules: {
20276
+ ...renameRules2(
20277
+ strict ? pluginReact.configs["strict-type-checked"] : pluginReact.configs["recommended-type-checked"]
20278
+ ),
20253
20279
  "react/no-leaked-conditional-rendering": "warn",
20254
20280
  "react/no-implicit-key": "warn",
20255
20281
  "react/no-unused-props": strict ? "error" : "warn"
package/dist/preset.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { isInEditorEnv, interopDefault, ensurePackages, renameRules, parserPlain, isPackageInScope } from './chunk-ZTS57MZL.js';
2
2
  import { getTsConfigPath } from './chunk-BI2UMAQU.js';
3
3
  import { findWorkspaceRoot } from './chunk-DC6IKVKL.js';
4
- import { joinPaths } from './chunk-6BPUJHCC.js';
4
+ import { joinPaths, dirname as dirname$1 } from './chunk-6BPUJHCC.js';
5
5
  import { __commonJS, init_esm_shims, __toESM, __require, __filename as __filename$1 } from './chunk-67G5I72Q.js';
6
6
  import * as __import_util from 'util';
7
7
  import * as __import__microsoft_tsdocConfig from '@microsoft/tsdoc-config';
@@ -14,7 +14,7 @@ import { loadConfig } from 'c12';
14
14
  import defu from 'defu';
15
15
  import chalk from 'chalk';
16
16
  import fs3, { existsSync, readFileSync } from 'node:fs';
17
- import path16, { dirname as dirname$1, join } from 'node:path';
17
+ import path16, { dirname as dirname$2, join } from 'node:path';
18
18
  import { readFile } from 'node:fs/promises';
19
19
  import { EOL } from 'node:os';
20
20
  import cspellConfig from '@cspell/eslint-plugin/recommended';
@@ -5566,7 +5566,7 @@ init_esm_shims();
5566
5566
 
5567
5567
  // ../eslint-plugin-banner/package.json
5568
5568
  var package_default = {
5569
- version: "0.0.25"};
5569
+ version: "0.0.26"};
5570
5570
 
5571
5571
  // ../eslint-plugin-banner/src/rules/banner.ts
5572
5572
  init_esm_shims();
@@ -19696,6 +19696,7 @@ async function react(options = {}) {
19696
19696
  ignoresTypeAware = [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS],
19697
19697
  strict = false,
19698
19698
  overrides = {},
19699
+ componentExts = [],
19699
19700
  tsconfigPath
19700
19701
  } = options;
19701
19702
  await ensurePackages([
@@ -19737,8 +19738,11 @@ async function react(options = {}) {
19737
19738
  (i) => isPackageExists(i)
19738
19739
  );
19739
19740
  const isUsingReactRouter = ReactRouterPackages.some((i) => isPackageExists(i));
19741
+ const [pluginTs, parserTs] = await Promise.all([
19742
+ interopDefault(import('@typescript-eslint/eslint-plugin')),
19743
+ interopDefault(import('@typescript-eslint/parser'))
19744
+ ]);
19740
19745
  return [
19741
- pluginReactHooks.configs.flat["recommended-latest"],
19742
19746
  {
19743
19747
  name: "storm/react/setup",
19744
19748
  plugins: {
@@ -19753,6 +19757,7 @@ async function react(options = {}) {
19753
19757
  "react-web-api": pluginReactWebApi
19754
19758
  }
19755
19759
  },
19760
+ pluginReactHooks.configs.flat["recommended-latest"],
19756
19761
  {
19757
19762
  files,
19758
19763
  languageOptions: {
@@ -19766,7 +19771,7 @@ async function react(options = {}) {
19766
19771
  name: "storm/react/rules",
19767
19772
  rules: {
19768
19773
  ...renameRules2(
19769
- !!tsconfigPath ? strict ? pluginReact.configs["strict-type-checked"] : pluginReact.configs["recommended-type-checked"] : strict ? pluginReact.configs["strict"] : pluginReact.configs["recommended"]
19774
+ strict ? pluginReact.configs["strict"] : pluginReact.configs["recommended"]
19770
19775
  ),
19771
19776
  "react-hooks/exhaustive-deps": strict ? "error" : "warn",
19772
19777
  "react-hooks/rules-of-hooks": "error",
@@ -19839,9 +19844,6 @@ async function react(options = {}) {
19839
19844
  "react/no-unstable-default-props": "warn",
19840
19845
  "react/no-unused-class-component-members": "warn",
19841
19846
  "react/no-unused-state": "warn",
19842
- // "react/prefer-destructuring-assignment": "warn",
19843
- // "react/prefer-shorthand-boolean": "warn",
19844
- // "react/prefer-shorthand-fragment": "warn",
19845
19847
  ...overrides
19846
19848
  }
19847
19849
  },
@@ -19849,8 +19851,25 @@ async function react(options = {}) {
19849
19851
  {
19850
19852
  files: filesTypeAware,
19851
19853
  ignores: ignoresTypeAware,
19854
+ languageOptions: {
19855
+ parser: parserTs,
19856
+ parserOptions: {
19857
+ extraFileExtensions: componentExts.map((ext2) => `.${ext2}`),
19858
+ ecmaFeatures: { jsx: true },
19859
+ ecmaVersion: 2022,
19860
+ sourceType: "module",
19861
+ projectService: {
19862
+ allowDefaultProject: [GLOB_SRC_FILE],
19863
+ defaultProject: tsconfigPath
19864
+ },
19865
+ tsconfigRootDir: !tsconfigPath ? findWorkspaceRoot() : dirname$1(tsconfigPath)
19866
+ }
19867
+ },
19852
19868
  name: "storm/react/type-aware-rules",
19853
19869
  rules: {
19870
+ ...renameRules2(
19871
+ strict ? pluginReact.configs["strict-type-checked"] : pluginReact.configs["recommended-type-checked"]
19872
+ ),
19854
19873
  "react/no-leaked-conditional-rendering": "warn",
19855
19874
  "react/no-implicit-key": "warn",
19856
19875
  "react/no-unused-props": strict ? "error" : "warn"
@@ -20403,7 +20422,7 @@ async function typescript(options = {}) {
20403
20422
  allowDefaultProject: [GLOB_SRC_FILE],
20404
20423
  defaultProject: tsconfigPath
20405
20424
  },
20406
- tsconfigRootDir: !tsconfigPath ? findWorkspaceRoot() : dirname$1(tsconfigPath)
20425
+ tsconfigRootDir: !tsconfigPath ? findWorkspaceRoot() : dirname$2(tsconfigPath)
20407
20426
  } : {},
20408
20427
  ...parserOptions
20409
20428
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.170.93",
3
+ "version": "0.170.94",
4
4
  "private": false,
5
5
  "description": "A package containing the base ESLint configuration used by Storm Software across many projects.",
6
6
  "keywords": [
@@ -196,7 +196,7 @@
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.26",
199
+ "@storm-software/eslint-plugin-banner": "^0.0.26",
200
200
  "@storm-software/eslint-plugin-pnpm": "^0.0.24",
201
201
  "@storm-software/eslint-plugin-tsdoc": "^0.0.24",
202
202
  "@stylistic/eslint-plugin-migrate": "^4.4.1",
@@ -271,5 +271,5 @@
271
271
  "zod": { "optional": true }
272
272
  },
273
273
  "publishConfig": { "access": "public" },
274
- "gitHead": "679dea48cf6192e6df471e5d9b810c7828a96b89"
274
+ "gitHead": "8e16cad354d1a5fecfbd25f87783ecdf4062e5c4"
275
275
  }